我在$HOME/local
安装了boost,并下载了mongo-cxx-driver-v2.4
并运行scons --extrapath=$HOME/local
,输出显示
scons: Reading SConscript files ...
Checking for C++ library boost_thread-mt... no
Checking for C++ library boost_thread... no
config.log
中的内容显示错误:
缺点:配置:检查C ++库boost_thread ... .sconf_temp / conftest_1.cpp< - | | | | INT | main(){ | |返回0; |} | g ++ -o .sconf_temp / conftest_1.o -c -O3 -pthread -D_SCONS -DMONGO_EXPOSE_MACROS -Ibuild -Ibuild / mongo -I / home / jiang / lei / local / include -I / home / jiang / lei / local .sconf_temp / conftest_1.cpp g ++ -o .sconf_temp / conftest_1 -pthread .sconf_temp / conftest_1.o -L / home / jiang / lei / local / lib -L / home / jiang / lei / local / lib64 -lboost_thread / usr / bin / ld:警告:未找到/home/jiang/lei/local/lib/libboost_thread.so所需的libboost_system.so.1.54.0(尝试使用-rpath或-rpath-link) /home/jiang/lei/local/lib/libboost_thread.so:对
boost::system::system_category()' /home/jiang/lei/local/lib/libboost_thread.so: undefined reference to
boost :: system :: generic_category()'的未定义引用 collect2:ld返回1退出状态 scons:配置:否
我还尝试将LD_LIBRARY_PATH
设置为$HOME/local
,但它没有帮助。
我怎么能让Scons正确找到boost_system.so?
答案 0 :(得分:0)
您是否尝试过使用这些选项:
- --use-system-boost
- --libpath
那是:
scons --full --use-system-boost --sharedclient -j5 --cpppath ${HOME}/include --libpath=${HOME}/lib