ros中使用pcl编译报错

Linking CXX executable /home/shyreckdc/catkin_ws/devel/lib/my_pcl/cloud_viewer
/usr/bin/ld: CMakeFiles/cloud_viewer.dir/src/cloud_viewer.cpp.o: undefined reference to symbol '_ZN15vtkSphereSource3NewEv'
//usr/lib/libvtkGraphics.so.5.8: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [/home/shyreckdc/catkin_ws/devel/lib/my_pcl/cloud_viewer] Error 1
make[1]: *** [my_pcl/CMakeFiles/cloud_viewer.dir/all] Error 2
make: *** [all] Error 2

Invoking "make -j4 -l4" failed


按照错误中提示在target_link_libraries中添加libvtkGraphics.so就可以编译通过

你可能感兴趣的:(pcl)