Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » PCL + cmake : Compiles Fine, but errors while in the path [SOLVED](PCL objects : "Could not be resolve" while in the path)
PCL + cmake : Compiles Fine, but errors while in the path [SOLVED] [message #755517] Tue, 08 November 2011 16:59 Go to next message
boulch Mising nameFriend
Messages: 2
Registered: November 2011
Junior Member
Hello,

I currently use CDT with cmake to build a Point Cloud Library (PCL) project.

Here is my CMakeLists :
**********************************************************************
**********************************************************************
cmake_minimum_required(VERSION 2.Cool
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]

Report message to a moderator

Re: PCL + cmake : Compiles Fine, but errors while in the path [message #1075330 is a reply to message #755517] Mon, 29 July 2013 08:51 Go to previous message
boulch Mising nameFriend
Messages: 2
Registered: November 2011
Junior Member
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.
Previous Topic:Linker Error
Next Topic:No Loadable sections found in added symbol-file
Goto Forum:
  


Current Time: Fri Mar 29 10:59:23 GMT 2024

Powered by FUDForum. Page generated in 0.04516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top