(ros/catkin) ××/××.h: No such file or directory

操作系统:ros(indigo)/ubuntu14.04
编译工具:cmake(catkin_make)

出现错误:
robot_control/src/robot_control.cpp:9:62: fatal error: robot_control/robot_control.h: No such file or directory
 #include<robot_control/robot_control.h>

出现此错误时,有三种可能情况:
  1. 此.h文件是由自定义消息生成的,如robot_msgs/voltage.msg
     则解决方法是cmakeList中添加:
      add_executable(robot_control_node  src/robot_control.cpp )
      add_dependencies(robot_control_node robot_msgs_gencpp)
      target_link_libraries(robot_control_node ${catkin_LIBRARIES})
    其中:robot_control_node是所要生成的可执行文件,add_dependencies添加所需依赖。
    请记得,在find_package中添加robot_msgs。
 
    其次,请记得在package.xml中添加
       <build_depend>robot_msgs</build_depend>
       <run_depend>robot_msgs</run_depend>

2. 此.h文件位于本包include内:
       解决方法是,在包含目录下包含include包:
            include_directories(
               include
             ${catkin_INCLUDE_DIRS} 
         )

3. 此.h文件位于别的包内,如robot_navigation:
     则在find_package中添加此包名:
  find_package(catkin REQUIRED COMPONENTS
    roscpp
     rospy
    std_msgs
   robot_navigation
  )
  其次,请记得在package.xml中添加
    <build_depend>robot_navigation</build_depend>
    <run_depend>robot_navigation</run_depend>

时间: 2024-08-24 06:20:26

(ros/catkin) ××/××.h: No such file or directory的相关文章

Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法

错误描述 安装Redis 2.8.18时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/data0/src/redis-2.6.2/src

编译Busybox时,出现错误fatal error: curses.h: No such file or directory

1 scripts/kconfig/mconf.c: In function ‘exec_conf’: 2 scripts/kconfig/mconf.c:481:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result] 3 pipe(pipefd); 4 ^ 5 SHIPPED scripts/kconfig/zconf.tab.c 6 SH

出错mlogc.c:32:23: error: curl/curl.h: No such file or directory

出现下列错误: mlogc.c:32:23: error: curl/curl.h: No such file or directory mlogc.c:1091: error: expected ')' before '*' token mlogc.c: In function 'logc_init': 出错原因:缺少libcurl-dev or libcurl-devel centOS上安装依赖包: yum install libcurl-dev libcurl-devel 出错mlogc.

【解决】 无法打开包括文件:“windows.h”: No such file or directory

vs编译时错误: 无法打开包括文件:"windows.h": No such file or directory 出现这种错误什么都不用配置(环境变量),最好办法是将VS安装在C盘,让开发工具自动包含,省去配置解决方案包含目录及环境变量.

fatal error: openssl/sha.h: No such file or directory 解决方案

出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, header files and manpages,他是openssl的一部分,而openssl对ssl进行了实现- 解决方案: 使用sudo apt-get install libssl-dev来安装libssl-dev即可

[转]pro*c/c++编译错误 ” error: sqlca.h: No such file or directory “ 的解决办法

$ gcc -o test test.c 出现错误:error: sqlca.h: No such file or directory [解决方法]知道 sqlca.h 在 $ORACLE_HOME/precomp/public/下更正后执行“$ gcc -o test test.c -I $ORACLE_HOME/precomp/public 又出现错误: undefined reference to `sqlcxt' [解决方法]需要用到$ORACLE_HOME/lib/libclntsh.

CentOS: make menuconfig error: curses.h: No such file or directory

the problem  when use centos5 to build kernel or busybox step 1. Centos中关于 ncurses.h:no such file or directory错误的问题 http://blog.sina.com.cn/s/blog_9f1c09310101a668.html 原因是系统中没有安装ncurses这个库函数,从网上查了个能在Centos上解决这个问题的安装方式: yum install ncurses-devel ncur

jemalloc/jemalloc.h: No such file or directory

Redis 2.6.9 安装报错,提示: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directoryzmalloc.h:55:2: error: #error "Newer version of jemalloc required"make[1]: *** [adlist.o] Error 1make[1]: Leaving directory `/data0/src/redis-2.6.2/src'ma

mysql-python 安装错误 fatal error C1083: Cannot open include file: &#39;config-win.h&#39;: No such file or directory

安装mysql-python之前, 请先安装setuptools. https://pypi.python.org/pypi/setuptools/7.0 下载mysql-python. 下载源码包. https://pypi.python.org/pypi/MySQL-python/1.2.5 解压后执行 python setup.py install 提示错误: fatal error C1083: Cannot open include file: 'config-win.h': No s