我试图链接与PCL库中的C ++应用程序。 我安装PCL和所有使用VCPKG依赖。 我使用Visual Studio 2017年和cmake的3.12 X64。 当我试图建立它给我下面的错误的解决方案。
E0145 member "boost::filesystem::path::separator" may not be initialized
C:\vcpkg-pcl\vcpkg-master\installed\x64-
windows\include\boost\filesystem\path.hpp 65
E0145 member "boost::filesystem::path::preferred_separator" may not be
initialized C:\vcpkg-pcl\vcpkg-master\installed\x64-
windows\include\boost\filesystem\path.hpp 66
E0145 member "boost::filesystem::path::dot" may not be initialized
C:\vcpkg-pcl\vcpkg-master\installed\x64-
windows\include\boost\filesystem\path.hpp 67
E2512 the argument to a feature-test macro must be a simple identifier
C:\vcpkg-pcl\vcpkg-master\installed\x64-
windows\include\boost\system\error_code.hpp 401
在我发现这个错误控制台沉绵我使用VCPKG并设置PTHREADS_INCLUDE变装P线程库
-- Looking for pthread.h - not found
这是我的CMakeLists.txt文件
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(compute_parameters)
find_package(PCL 1.5 REQUIRED)
SET(PTHREADS_INCLUDE "${PTHREADS_ROOT}/include")
find_path (PTHREADS_INCLUDE "pthread.h" NO_CMAKE_FIND_ROOT_PATH)
include_directories(${PCL_INCLUDE_DIRS};${PTHREADS_INCLUDE})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (compute_parameters compute_parameters.cpp)
target_link_libraries (compute_parameters ${PCL_LIBRARIES})
任何帮助将不胜感激。