本文共 25360 字,大约阅读时间需要 84 分钟。
安装X11sudo apt-get install libx11-dev libxext-dev libxtst-dev libxrender-dev libxmu-dev libxmuu-dev安装OpenGLsudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev键入如下命令来安装libglut-devsudo apt-get install freeglut3-dev
./bootstrap-vcpkg.sh./vcpkg help tripletAvailable architecture triplets: arm-uwp arm-windows arm64-uwp arm64-windows x64-linux x64-osx x64-uwp x64-windows x64-windows-static x86-uwp x86-windows x86-windows-static
./vcpkg search pclpcl 1.9.1-9 Point Cloud Library (PCL) is open source library for 2D/3D image and point clo...pcl[openni2] OpenNI2 support for PCLpcl[qt] Qt support for PCLpcl[pcap] PCAP support for PCLpcl[tools] Build PCL utilitiespcl[cuda] CUDA support for PCLpcl[opengl] OpenGL support for PCLrpclib 2.2.1-1 a RPC library for C++, providing both a client and server implementation. It i...If your library is not listed, please open an issue at and/or consider making a pull request: https://github.com/Microsoft/vcpkg/issues
./vcpkg install pcl[cuda][opengl][openni2][qt]:x64-linux
有可能找不到CUDA,而且他让使用的是CUDA10.1以上
解决方式:
export CUDA_PATH=/usr/local/cuda;
export CUDA_BIN_PATH=/usr/local/cuda/bin; ./vcpkg install cuda;
会让你下载对应的gcc g++版本,我的是7.4.0:然后切换
我的是vcpkg:
对应gcc7.4.0 g++7.4.0
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 80
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 80
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 40
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 40
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
sudo apt-get install curl unzip tar
./bootstrap-vcpkg.sh
./vcpkg integrate installApplied user-wide integration for this vcpkg root.CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/media/boyun/NO_1/ubuntu16.04/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake"
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake"
./vcpkg install sdl2 curl
./vcpkg install pcl:x64-linux 会安装Debug和Release版本
安装过程会下载很多东西:
-- Performing post-build validation-- Performing post-build validation doneBuilding package pcl[core]:x64-linux... doneInstalling package pcl[core]:x64-linux...Installing package pcl[core]:x64-linux... doneElapsed time for package pcl:x64-linux: 33.1 minTotal elapsed time: 1.297 hThe package pcl:x64-linux provides CMake targets: find_package(PCL CONFIG REQUIRED) target_link_libraries(main PRIVATE ${pcl_component})
现在的问题来了,编译好后,怎么用,因为编译的位置不在/usr目录下,程序肯定找不到
参考:
在Ubuntu上安装git,cmake,gcc7.3.0.这三个网上的安装教程多如牛毛.这里就不复述了.现在我把我机器上的安装环境截图如下.
cmake --version cmake version 3.5.1
-DCMAKE_TOOLCHAIN_FILE=/home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake
切换到7
sudo update-alternatives --config g++
sudo update-alternatives --config gcc
-- The C compiler identification is GNU 5.4.0-- The CXX compiler identification is GNU 5.4.0-- Check for working C compiler: /usr/bin/cc-- Check for working C compiler: /usr/bin/cc -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Detecting C compile features-- Detecting C compile features - done-- Check for working CXX compiler: /usr/bin/c++-- Check for working CXX compiler: /usr/bin/c++ -- works-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Detecting CXX compile features-- Detecting CXX compile features - done-- Checking for module 'eigen3'-- Found eigen3, version 3.3.7-- Found Eigen: /home/spple/paddle/vcpkg/installed/x64-linux/include/eigen3 -- Eigen found (include: /home/spple/paddle/vcpkg/installed/x64-linux/include/eigen3, version: 3.3.7)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)CMake Warning at /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:847 (message): New Boost version may have incorrect or missing dependencies and imported targetsCall Stack (most recent call first): /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:963 (_Boost_COMPONENT_DEPENDENCIES) /home/spple/clion-2018.2.5/bin/cmake/linux/share/cmake-3.12/Modules/FindBoost.cmake:1622 (_Boost_MISSING_DEPENDENCIES) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:227 (_find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:138 (find_package) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:302 (find_boost) /home/spple/paddle/vcpkg/installed/x64-linux/share/pcl/PCLConfig.cmake:526 (find_external_library) /home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake:263 (_find_package) CMakeLists.txt:8 (find_package)-- Looking for pthread.h-- Looking for pthread.h - found-- Looking for pthread_create-- Looking for pthread_create - not found-- Looking for pthread_create in pthreads-- Looking for pthread_create in pthreads - not found-- Looking for pthread_create in pthread-- Looking for pthread_create in pthread - found-- Found Threads: TRUE -- Boost version: 1.71.0-- Found the following Boost libraries:-- system-- filesystem-- thread-- date_time-- iostreams-- serialization-- chrono-- atomic-- regex** WARNING ** io features related to png will be disabled-- Found Qhull: optimized;/home/spple/paddle/vcpkg/installed/x64-linux/lib/libqhullstatic.a;debug;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libqhullstatic_d.a -- QHULL found (include: /home/spple/paddle/vcpkg/installed/x64-linux/include, lib: optimized;/home/spple/paddle/vcpkg/installed/x64-linux/lib/libqhullstatic.a;debug;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libqhullstatic_d.a)-- looking for PCL_COMMON-- Found PCL_COMMON: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_common.a -- looking for PCL_KDTREE-- Found PCL_KDTREE: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_kdtree.a -- looking for PCL_OCTREE-- Found PCL_OCTREE: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_octree.a -- looking for PCL_SEARCH-- Found PCL_SEARCH: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_search.a -- looking for PCL_SAMPLE_CONSENSUS-- Found PCL_SAMPLE_CONSENSUS: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_sample_consensus.a -- looking for PCL_FILTERS-- Found PCL_FILTERS: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_filters.a -- looking for PCL_2D-- Found PCL_2D: /home/spple/paddle/vcpkg/installed/x64-linux/include -- looking for PCL_GEOMETRY-- Found PCL_GEOMETRY: /home/spple/paddle/vcpkg/installed/x64-linux/include -- looking for PCL_IO-- Found PCL_IO: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_io.a -- looking for PCL_FEATURES-- Found PCL_FEATURES: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_features.a -- looking for PCL_ML-- Found PCL_ML: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_ml.a -- looking for PCL_SEGMENTATION-- Found PCL_SEGMENTATION: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_segmentation.a -- looking for PCL_VISUALIZATION-- Found PCL_VISUALIZATION: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_visualization.a -- looking for PCL_SURFACE-- Found PCL_SURFACE: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_surface.a -- looking for PCL_REGISTRATION-- Found PCL_REGISTRATION: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_registration.a -- looking for PCL_KEYPOINTS-- Found PCL_KEYPOINTS: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_keypoints.a -- looking for PCL_TRACKING-- Found PCL_TRACKING: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_tracking.a -- looking for PCL_RECOGNITION-- Found PCL_RECOGNITION: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_recognition.a -- looking for PCL_STEREO-- Found PCL_STEREO: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_stereo.a -- looking for PCL_OUTOFCORE-- Found PCL_OUTOFCORE: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_outofcore.a -- looking for PCL_PEOPLE-- Found PCL_PEOPLE: /home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libpcl_people.a -- Found PCL: pcl_common;pcl_kdtree;pcl_octree;pcl_search;pcl_sample_consensus;pcl_filters;pcl_io;pcl_features;pcl_ml;pcl_segmentation;pcl_visualization;pcl_surface;pcl_registration;pcl_keypoints;pcl_tracking;pcl_recognition;pcl_stereo;pcl_outofcore;pcl_people;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_system.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_filesystem.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_thread.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_date_time.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_iostreams.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_serialization.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_chrono.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_atomic.a;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libboost_regex.a;optimized;/home/spple/paddle/vcpkg/installed/x64-linux/lib/libqhullstatic.a;debug;/home/spple/paddle/vcpkg/installed/x64-linux/debug/lib/libqhullstatic_d.a;flann::flann_cpp;vtksys;vtkCommonCore;vtkCommonMath;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkCommonDataModel;vtkCommonColor;vtkCommonExecutionModel;vtkCommonComputationalGeometry;vtkFiltersCore;vtkFiltersGeneral;vtkImagingCore;vtkImagingFourier;vtkFiltersStatistics;vtkFiltersExtraction;vtkInfovisCore;vtkFiltersGeometry;vtkFiltersSources;vtkRenderingCore;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libz.a;optimized;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libfreetype.a;debug;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/libfreetyped.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libbz2.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/libbz2d.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../share/png/../../lib/libpng16.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/libpng16d.a;vtkRenderingFreeType;vtkRenderingContext2D;vtkChartsCore;vtkDICOMParser;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libdouble-conversion.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/liblz4.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/liblz4d.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/liblzma.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/liblzmad.a;vtkIOCore;vtkIOLegacy;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libexpat.a;vtkIOXMLParser;vtkDomainsChemistry;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libGLEW.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/libGLEWd.a;vtkRenderingOpenGL2;vtkDomainsChemistryOpenGL2;vtkIOXML;vtkParallelCore;vtkFiltersAMR;vtkFiltersFlowPaths;vtkFiltersGeneric;vtkImagingSources;vtkFiltersHybrid;vtkFiltersHyperTree;vtkImagingGeneral;vtkFiltersImaging;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelImaging;vtkFiltersPoints;vtkFiltersProgrammable;vtkFiltersSMP;vtkFiltersSelection;vtkFiltersTexture;vtkFiltersTopology;verdict;vtkFiltersVerdict;vtkmetaio;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libjpeg.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libtiff.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/libtiffd.a;m;vtkIOImage;vtkImagingHybrid;vtkInfovisLayout;vtkInteractionStyle;vtkImagingColor;vtkRenderingAnnotation;vtkRenderingVolume;vtkInteractionWidgets;vtkViewsCore;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/proj.lib;vtkGeovisCore;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libhdf5.a;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libszip.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libhdf5_hl.a;vtkIOAMR;vtkIOAsynchronous;vtkIOCityGML;vtkIOEnSight;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libnetcdf.a;vtkexodusII;vtkIOExodus;vtkgl2ps;vtkRenderingGL2PSOpenGL2;vtkIOExport;vtkIOExportOpenGL2;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libhpdf.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../debug/lib/libhpdfd.a;vtkIOExportPDF;vtkIOGeometry;vtkIOImport;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libxml2.a;vtkIOInfovis;vtkIOLSDyna;vtkIOMINC;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libogg.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libtheoraenc.a;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libtheoradec.a;vtkIOMovie;vtkIONetCDF;vtkIOPLY;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libjsoncpp.a;vtkIOParallel;vtkIOParallelXML;/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/libsqlite3.a;vtkIOSQL;vtkIOSegY;vtkIOTecplotTable;vtkIOVeraOut;vtkIOVideo;vtkImagingMath;vtkImagingMorphological;vtkImagingStatistics;vtkImagingStencil;vtkInteractionImage;vtkRenderingContextOpenGL2;vtkRenderingImage;vtkRenderingLOD;vtkRenderingLabel;vtkRenderingVolumeOpenGL2;vtkViewsContext2D;vtkViewsInfovis;vtkViewsGeovis -- Configuring done-- Generating done-- Build files have been written to: /home/spple/CLionProjects/vcpkg_PCL_demo1/cmake-build-debug[Finished]
遇到错误:
Scanning dependencies of target PCL_demo1[ 50%] Building CXX object CMakeFiles/PCL_demo1.dir/main.cpp.omake[3]: *** No rule to make target '/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../lib/proj.lib', needed by 'PCL_demo1'。 停止。make[3]: *** 正在等待未完成的任务....In file included from /home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../include/boost/detail/endian.hpp:9:0, from /home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../include/pcl/PCLPointCloud2.h:11, from /home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../include/pcl/pcl_base.h:55, from /home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../include/pcl/common/io.h:45, from /home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../include/pcl/io/file_io.h:42, from /home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../include/pcl/io/pcd_io.h:44, from /home/spple/CLionProjects/vcpkg_PCL_demo1/main.cpp:2:/home/spple/paddle/vcpkg/installed/x64-linux/share/vtk/../../include/boost/predef/detail/endian_compat.h:11:161: note: #pragma message: The use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please includeand use BOOST_ENDIAN_*_BYTE instead #pragma message("The use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include and use BOOST_ENDIAN_*_BYTE instead") ^CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/PCL_demo1.dir/all' failedmake[2]: *** [CMakeFiles/PCL_demo1.dir/all] Error 2CMakeFiles/Makefile2:84: recipe for target 'CMakeFiles/PCL_demo1.dir/rule' failedmake[1]: *** [CMakeFiles/PCL_demo1.dir/rule] Error 2Makefile:118: recipe for target 'PCL_demo1' failedmake: *** [PCL_demo1] Error 2
因为proj4的问题
我下载的版本是:
最新的版本是:
时间:
Oct 24, 2019
#linux .o,.a,.so#.o,是目标文件,相当于windows中的.obj文件#.so 为共享库,是shared object,用于动态连接的,相当于windows下的dll#.a为静态库,是好多个.o合在一起,用于静态连接
升级这个库
或者按:
改完后,重新安装pcl
我自己试了一下boost:
spple@spple:~$ sudo apt-get install libboost-dev[sudo] spple 的密码: 正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 libboost-dev 已经是最新版 (1.58.0.1ubuntu1)。libboost-dev 已设置为手动安装。
/home/spple/clion-2018.2.5/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/home/spple/paddle/vcpkg/scripts/buildsystems/vcpkg.cmake -G "CodeBlocks - Unix Makefiles" /home/spple/CLionProjects/vcpkg_PCL_demo1-- Boost version: 1.71.0-- Configuring done-- Generating done-- Build files have been written to: /home/spple/CLionProjects/vcpkg_PCL_demo1/cmake-build-debug
cmake_minimum_required(VERSION 3.12)project(PCL_demo1)set(CMAKE_CXX_STANDARD 11)#find_package(PCL CONFIG REQUIRED)find_package(Boost REQUIRED)include_directories(${PCL_INCLUDE_DIRS})link_directories(${PCL_LIBRARY_DIRS})#list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")add_definitions(${PCL_DEFINITIONS})add_executable(PCL_demo1 main.cpp)target_link_libraries (PCL_demo1 ${PCL_LIBRARIES})
#include#include #include class Shared{public: Shared() { std::cout << "ctor() called" << std::endl; } Shared(const Shared & other) { std::cout << "copy ctor() called" << std::endl; } ~Shared() { std::cout << "dtor() called" << std::endl; } Shared & operator =(const Shared & other) { std::cout << "operator = called" << std::endl; }};int main(){ typedef boost::shared_ptr SharedSP; typedef std::vector VShared; VShared v; v.push_back(SharedSP(new Shared())); v.push_back(SharedSP(new Shared()));}
/home/spple/CLionProjects/vcpkg_PCL_demo1/cmake-build-debug/PCL_demo1ctor() calledctor() calleddtor() calleddtor() calledProcess finished with exit code 0
运行没问题,说明vcpkg编译出来的boost,通过Clion+cmake可以直接使用,但是关于PCL,有一些不同的库依赖,一定要用对
转载地址:http://qmgof.baihongyu.com/