我正在尝试将 C++ 应用程序与 PCL 库链接。我使用 VCPKG 安装了 PCL 及其所有依赖项。我正在使用 Visual Studio 2017 和 cmake 3.12 for 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 库并设置了 PTHREADS_INCLUDE 变量
-- 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})
任何帮助将不胜感激。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)