1 CMAKE ..时出现的问题:
CMakeFiles/pcl_test.dir/tuzi3.cpp.o: In function `boost::this_thread::sleep(boost::posix_time::ptime const&)':
tuzi3.cpp:(.text._ZN5boost11this_thread5sleepERKNS_10posix_time5ptimeE[_ZN5boost11this_thread5sleepERKNS_10posix_time5ptimeE]+0x37): undefined reference to `boost::this_thread::hidden::sleep_until(timespec const&)'
2 解决:
参考https://blog.csdn.net/moneymyone/article/details/122897274
但是方法1不行,方法2可行,即为:需要在cmake之后,修改生成的项目.dir
目录下link.txt文件,
在文件最后增加
-lboost_thread ,空格加。
。。。 /usr/lib/x86_64-linux-gnu/libboost_serialization.so
/usr/lib/x86_64-linux-gnu/libboost_regex.so -Wl,-rpath-link,/usr/local/lib -lboost_thread
再次make,即可成功。