![]() | Tue, 08 November 2011 16:59 ![]() | |||
| ||||
Hello, I currently use CDT with cmake to build a Point Cloud Library (PCL) project. Here is my CMakeLists : ********************************************************************** ********************************************************************** cmake_minimum_required(VERSION 2. ![]() PROJECT( project_name ) set(EXECUTABLE_NAME executable) add_executable( #executable ${EXECUTABLE_NAME} #libraries IOCloud.h Ply.hpp #source code main.cpp Ply.cpp ) set(CMAKE_BUILD_TYPE Release) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) include_directories( ${CMAKE_CURRENT_BINARY_DIR}) #packages #PointCloud Library find_package( PCL 1.1 REQUIRED) if(PCL_FOUND) include_directories( ${PCL_INCLUDE_DIRS} ) link_directories( ${PCL_LIBRARY_DIRS} ) add_definitions( ${PCL_DEFINITIONS} ) target_link_libraries( ${EXECUTABLE_NAME} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES} ${PCL_LIBRARIES} ) endif() #OpenMp find_package( OpenMP REQUIRED) #include(FindOpenMP) if(OPENMP_FOUND) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") endif() ********************************************************************** ********************************************************************** I'm running Eclipse 3.7.1 on Ubuntu 11.10 The project imported in Eclipse, compiles and runs fine. The PCL libraries are in the include Path. The completion works for #include <pcl/... But all the pcl objects and function can't be resolved (red underline and "could not be resolved" message). It looks like it doesn't know the namespace. Can anyone help me ? Thanks. [Updated on: Mon, 29 July 2013 08:52] | ||||
|
![]() | Mon, 29 July 2013 08:51 ![]() | |||
| ||||
It appears that PCL include conflicts with Eigen include. In project-> properties -> include paths, removing the include of eigen solved the problem. PS: this was for a project generated by CMake, for a imported makefile project, adding PCL to the dependency and Eigen produce the same problem. |