编译PCL1.6.0源码时链接出错
2014-02-12 13:09
141 查看
这两天按照点击打开链接所描述的一步一步的做,最后在构建ALL_BUILD项目时,报以下错误:
起初以为是Boost库的问题,按理说Boost1.50.0的版本相对于AllINOne里的Boost版本是要高些的,不应该出现这种问题,没办法只好google一下,google的大部分结果基本上是在http://www.pcl-users.org论坛里的帖子,并且没有人做出解答。而http://dev.pointclouds.org/issues/741里也有这种问题,然而一时半会也没看明白,这时只好回归到报错信息本身上,报错信息意思是thread.obj中引用了boost::chrono有关内容,然而boost::chrono却并没有实现,因此需要额外添加相关库文件。将对应工程链接的库文件与PCL1.7.1链接的库文件对比,终于发现要添加链接库文件是boost_chrono-vc100-mt-gd-1_50.lib,然而整个解决方案里的工程实在是太多了,一个一个添加相当费时!这时http://dev.pointclouds.org/issues/741里面提醒了我,要将cmake/pcl_find_boost.cmake文件里的
后来编译PCL1.7.1时,发现已经解决该问题了,其cmake/pcl_find_boost.cmake文件中相应内容为
之后重新cmake整个源代码,然后BuildAll,就一路顺畅,编译链接通过。
libboost_thread-vc100-mt-gd-1_50.lib(thread.obj) : error LNK2019: external symbol "public: static class boost::chrono::time_point<class boost::chrono::system_clock,class boost::chrono::duration<__int64,class boost::ratio<1,10000000> > > __cdecl boost::chrono::system_clock::now(void)" (?now@system_clock@chrono@boost@@SA?AV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0JIJGIA@@boost@@@23@@23@XZ)not resolved in function "public: bool __thiscall boost::thread::try_join_until(class boost::chrono::time_point<class boost::chrono::system_clock,class boost::chrono::duration<__int64,class boost::ratio<1,1000000000> > > const &)" (?try_join_until@thread@boost@@QAE_NABV?$time_point@Vsystem_clock@chrono@boost@@V?$duration@_JV?$ratio@$00$0DLJKMKAA@@boost@@@23@@chrono@2@@Z) 3>C:\PCL\bin\pcl_octree_debug.dll : fatal error LNK1120: 1 external not risolved
起初以为是Boost库的问题,按理说Boost1.50.0的版本相对于AllINOne里的Boost版本是要高些的,不应该出现这种问题,没办法只好google一下,google的大部分结果基本上是在http://www.pcl-users.org论坛里的帖子,并且没有人做出解答。而http://dev.pointclouds.org/issues/741里也有这种问题,然而一时半会也没看明白,这时只好回归到报错信息本身上,报错信息意思是thread.obj中引用了boost::chrono有关内容,然而boost::chrono却并没有实现,因此需要额外添加相关库文件。将对应工程链接的库文件与PCL1.7.1链接的库文件对比,终于发现要添加链接库文件是boost_chrono-vc100-mt-gd-1_50.lib,然而整个解决方案里的工程实在是太多了,一个一个添加相当费时!这时http://dev.pointclouds.org/issues/741里面提醒了我,要将cmake/pcl_find_boost.cmake文件里的
# Required boost modules find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)修改为
# Required boost modules find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams chrono)
后来编译PCL1.7.1时,发现已经解决该问题了,其cmake/pcl_find_boost.cmake文件中相应内容为
# Required boost modules set(BOOST_REQUIRED_MODULES system filesystem thread date_time iostreams) # Starting with Boost 1.50, boost_thread depends on chrono. As this is not # taken care of automatically on Windows, we add an explicit dependency as a # workaround. if(WIN32 AND Boost_VERSION VERSION_GREATER "104900") set(BOOST_REQUIRED_MODULES ${BOOST_REQUIRED_MODULES} chrono) endif(WIN32 AND Boost_VERSION VERSION_GREATER "104900")
之后重新cmake整个源代码,然后BuildAll,就一路顺畅,编译链接通过。
相关文章推荐
- CMake+VS2013编译与安装32/64位PCL1.8RC1源码(附网盘链接)
- Ubuntu16 编译源码出错 unsupported reloc 43
- PCL 1.8.0 VS2010 x64源码编译
- flume1.6.0源码编译
- Ubuntu12.04编译PCL1.6源码
- 从源码编译TensorFlow出错和解决
- ubuntu 10.04下编译Android源码出错 //g++:找不到命令
- Ubuntu12.04编译PCL1.6源码
- linux下《UNIX环境高级编程》(apue2)源码编译出错的处理方法
- 宁可编译和链接时出错,也不要运行时出错
- 我这个冒泡法哪里出错了,编译没错,链接就出错了
- linux下《UNIX环境高级编程》(apue2)源码编译出错的处理方法
- Android 源码编译问题:Your version is: java version "1.6.0_27".The correct version is: Java SE 1.6.
- qt 编译时显示链接出错
- ubuntu13.10 编译时 关于链接xlib 库阶段出错的问题解决
- 编译出错和链接出错代替运行出错
- Ubuntu12.04下postgresql-9.3.4编译源码出错,无readline library not found
- Ubuntu编译android源码出错及问题解决
- Windows+QT5.9.2+QTCreator编译PCL1.8.1源码
- ubuntu 14.04 PCL 源码 编译 安装