您的位置:首页 > 产品设计 > UI/UE

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

2017-07-20 20:05 645 查看

PCL + cmake : Compiles Fine, but errors while in the
path [SOLVED] [message #755517]
Tue, 08 November 2011 16:59


boulch Mising name


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.


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/...

4000

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


boulch Mising name


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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: