eclipse+cmake:
https://www.vtk.org/Wiki/CMake:Eclipse_UNIX_Tutorial
eclipse+c++11:
https://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features
http://www.idevelopcode.com/unresolved-symbols-c11-eclipse-neon/
https://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support
https://stackoverflow.com/questions/17457069/enabling-c11-in-eclipse-juno-kepler-luna-cdt
eclipse+cmake+c++11:
这个问题困扰了很久很久很久。。。
问题出在
project/properties/Processor include maroc etc/entries/GNUC++/Controbuted Path Entry Containers/_cplusplus = 199711L
解决方案
https://stackoverflow.com/questions/18358389/eclipse-indexer-proper-c11-syntax-highlighting-when-generating-projects-with-c
cmake ../../src -G"Eclipse CDT4 - MinGW Makefiles" -DCMAKE_ECLIPSE_VERSION=4.2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_ARG1=-std=c++11
http://blog.csdn.net/matrixyy/article/details/52215977
综合以上方案
cmake ../ORB_SLAM2 -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_ECLIPSE_VERSION=4.7 -D CMAKE_CXX_COMPILER_ARG1=-std=c++0x -D CMAKE_BUILD_TYPE=Debug
注意CMAKE_BUILD_TYPE和CMAKE_CXX_COMPILER_ARG1
原因可能在于CDT4不支持c++11
查看
project/properties/Processor include maroc etc/entries/GNUC++/Controbuted Path Entry Containers/_cplusplus = 201103L
整合ros
catkin_make --force-cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_CXX_COMPILER_ARG1=-std=c++0x -DCMAKE_BUILD_TYPE=Debug