ros indigo eclipse pcl - unresolved issue .

用eclipse开发ROS时经常会遇到 Unresolved xxxx issues , 其实只要按照ros IDE官方教程再来一边基本都能解决,昨天pcl文件不能解析也是因为这个原因(跟环境变量和配置没有关系,浪费了不少时间)。

把官网的主要步骤摘录下来:

cd  catkin_ws

catkin_make --force-cmake -G"Eclipse CDT4 - Unix Makefiles"

awk -f $(rospack find mk)/eclipse.awk build/.project > build/.project_with_env && mv build/.project_with_env build/.project

After executing this command you will find the project files in the build/ folder. Now you can import your project as existing project into workspace.

Fixing unresolved includes

There are many possible reasons why indexing cannot resolve all includes, functions, methods, variables, etc. Often, fixing the resolving of includes solves these errors. If you have any problems, these might be fixed by:

  • If the dependencies of your project have changed since first adding them to Eclipse, regenerate the project files and reimport the project into your workspace.
  • Making sure to load your .bashrc environment with Eclipse, by launching it using bash -i -c "eclipse" (see Reusing your shell's environment).

  • In Eclipse, right click the project, click properties -> C/C++ general -> Preprocessor Include Paths, Macros etc. Click the tab "Providers" and check the box next to "CDT GCC Built-in Compiler Settings [ Shared ]".

  • Afterwards, right click the project, select Index -> Rebuild. This will rebuild your index. Once this is done, usually all includes will resolve.



猜你喜欢

转载自blog.csdn.net/longbinliu/article/details/79626466
今日推荐