gpt4 book ai didi

c++ - Mongo C++ 客户端库没有看到我的 boost

转载 作者:IT老高 更新时间:2023-10-28 13:30:11 25 4
gpt4 key购买 nike

我已经下载了 Boost 版本 1.51,构建了它,并将它放到/usr/local/boost_1_51_0。我还下载了 mongo-cxx-driver-v2.4。由于没有 Makefile,我必须运行 scons,因为这个项目使用的是新的 python 构建环境。当我运行 scons 时,它会检查 boost_thread-mt 和 boost_thread,两者都返回“no”。显然,在/usr/local 目录中没有看到我有 boost 。由于我是 Make 而不是 scons 人,我如何让 mongodb 构建过程看到我的 boost 版本?

routerwc:~/mongo_proj/mongo-cxx-driver-nightly # scons --cpppath=/usr/local/boost_1_51_0/ --libpath=/usr/local/boost_1_51_0/stage/lib/
scons: Reading SConscript files ...
Checking for C++ library boost_thread-mt... no
Checking for C++ library boost_thread... no
routerwc:~/mongo_proj/mongo-cxx-driver-nightly # cat config.log
file /root/mongo_proj/mongo-cxx-driver-nightly/SConstruct,line 70:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for C++ library boost_thread-mt....sconf_temp/conftest_0.cpp <-
|
|
|
|int
|main() {
|
|return 0;
|}
|
g++ -o .sconf_temp/conftest_0.o -c -O3 -pthread -D_SCONS -DMONGO_EXPOSE_MACROS -Ibuild -Ibuild/mongo .sconf_temp/conftest_0.cpp
g++ -o .sconf_temp/conftest_0 -Wl,--as-needed -Wl,-zdefs -pthread .sconf_temp/conftest_0.o -lboost_thread-mt
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_thread-mt
collect2: ld returned 1 exit status
scons: Configure: no

scons: 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 .sconf_temp/conftest_1.cpp
g++ -o .sconf_temp/conftest_1 -Wl,--as-needed -Wl,-zdefs -pthread .sconf_temp/conftest_1.o -lboost_thread
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lboost_thread
collect2: ld returned 1 exit status
scons: Configure: no

最佳答案

我遇到了同样的问题,我在/usr/include/boost_1_57_0 中下载并提取 boost 然后运行

sudo apt-get install libboost-all-dev

然后在目录中我有我运行的 c++ 驱动程序

sudo scons --extrapath=/usr/include/boost_1_57_0

关于c++ - Mongo C++ 客户端库没有看到我的 boost ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16720195/

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