我正在尝试让 PCL 1.7(点云库,而不是其他 pcl)在 Ubuntu 16.04 上运行。我最终希望用于 C++ 的东西,但现在我只是想让这些例子工作。我使用的是 Ubuntu (GNU 5.3.1) 附带的默认编译器和 Cmake 版本 3.5.2。我一直按照 PCL 网站上的说明进行操作(here http://pointclouds.org/documentation/tutorials/using_pcl_pcl_config.php and here http://pointclouds.org/documentation/tutorials/writing_pcd.php#writing-pcd),但目前我陷入了在让 Cmake 构建它想要构建的东西后使用“make”命令的地步。这是我得到的错误
[ 50%] Building CXX object CMakeFiles/pcd_write.dir/pcd_write.cpp.o
<command-line>:0:15: warning: missing whitespace after the macro name
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libproj.so', needed by 'pcd_write'. Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pcd_write.dir/all' failed
make[1]: *** [CMakeFiles/pcd_write.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
当我构建东西时,Cmake 还会向我发出警告,这些警告就在这里。它们不会阻止它运行,但它们可能是相关的。
-- Found OpenNI2: /usr/lib/libOpenNI2.so
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
-- The imported target "vtkRenderingPythonTkWidgets" references the file
"/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
" /usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.
另外,如果它是相关的,我早些时候做了一件可能愚蠢的事情,当时它给了我关于 VTK 的类似警告。它告诉我 /user/bin/vtk 已重命名或其他什么,确实如此。这个版本的 VTK 称为 vtk6。我尝试在 makefile 中查找并更改它,以便 Cmake 知道寻找 vtk6,但我在任何地方都找不到它,所以我进入 bin 并制作了一个名为 vtk 的 vtk6 副本,然后它停止了给我一个警告。
我使用的其他相关版本有 eigen3 3.2.92、boost 1.58.0、flan 1.8.4、vtk6 和 libopenni2 版本 2.2.0.3
同样,不确定其中有多少实际上很重要,但在我看来,太具体比太模糊更好。