编译kinfu过程中遇到的问题,CMake提示:Could not find the following Boost libraries: boost_sysytem boost_thread

kinfu是在PCL源码的GPU之下的,在编译的过程中参考了博客:

http://blog.csdn.net/u012601587/article/details/41786663

http://www.cnblogs.com/is-smiling/p/3343625.html

两篇文章中都是使用了VS2010开发环境,而我自己使用的是VS2013环境,可能是因为这个产生了一些意外的错误。

1、在CMake的Configuration中,提示无法找到一些库

Could not find the following Boost libraries:
	boost_sysytem
	boost_thread
编译kinfu过程中遇到的问题,CMake提示:Could not find the following Boost libraries: boost_sysytem boost_thread_第1张图片

经过查看,在Boost安装的目录下面,这些库是存在的:

所以我开始怀疑原因是,安装的Boost库是对应VS2010版本的,系统中只安装了VS2013,CMake调用了VS2013的编译器,所以无法使用Boost中的库,所以计划安装对应于VS2013的Boost库。


但是网上没有直接的安装包,需要下载源码进行编译。

①下载Boost库代码:

https://nchc.dl.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.zip

②选择一个文件夹解压源代码:

编译kinfu过程中遇到的问题,CMake提示:Could not find the following Boost libraries: boost_sysytem boost_thread_第2张图片

③双击bootstrap.bat,生成b2.exe和bjam.exe,这两个是Boost自带的编译工具。

④调用Win+R,输入cmd进入命令行,切换到Boost代码目录,输入b2.exe toolset=msvc-12.0 address-model=32 --build-dir=build\x86 install --prefix="D:\boost_1_59_0" -j8,开始执行,就会在该目录下生成一个include目录和lib目录,这两个如上图红框所示,使我们需要用到的。

⑤在C:\Program File下新建Boost文件夹,新建一个include目录,将D:\boost_1_59_0\include\boost-1_59下的Boost目录复制到C:\Program Files\Boost\include目录下;

将D:\boost_1_59_0下的lib目录复制到C:\Program Files\Boost下,结果如下:

编译kinfu过程中遇到的问题,CMake提示:Could not find the following Boost libraries: boost_sysytem boost_thread_第3张图片

⑥在环境变量中新建一个:名为BOOST_ROOT,值为C:\Program Files\Boost:

编译kinfu过程中遇到的问题,CMake提示:Could not find the following Boost libraries: boost_sysytem boost_thread_第4张图片

再次调用Cmake中的Configure就没问题了。

你可能感兴趣的:(工具,PCL)