我已经安装了boost $HOME/local
,下载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 :警告:libboost_system.so.1.54.0,/home/jiang/lei/local/lib/libboost_thread.so 需要,未找到(尝试使用-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?