gpt4 book ai didi

c++ - Mongodb 客户端的 SCons 找不到 libboost_system

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:10:14 26 4
gpt4 key购买 nike

我在 $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 中的内容显示错误:

cons: Configure: Checking for C++ library boost_thread... .sconf_temp/conftest_1.cpp <- | | | |int |main() { | |return 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: warning: libboost_system.so.1.54.0, needed by /home/jiang/lei/local/lib/libboost_thread.so, not found (try using -rpath or -rpath-link) /home/jiang/lei/local/lib/libboost_thread.so: undefined reference to boost::system::system_category()'
/home/jiang/lei/local/lib/libboost_thread.so: undefined reference to
boost::system::generic_category()' collect2: ld returned 1 exit status scons: Configure: no

我也尝试过将 LD_LIBRARY_PATH 设置为 $HOME/local 但它没有帮助。

如何让 Scons 正确找到 boost_system.so?

最佳答案

您是否尝试过使用以下选项:

 - --use-system-boost 

- --libpath

即:

scons --full --use-system-boost --sharedclient -j5 --cpppath ${HOME}/include --libpath=${HOME}/lib

关于c++ - Mongodb 客户端的 SCons 找不到 libboost_system,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18168857/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com