Mongo C++客户端库看不到我的提升
Mongo C++ Client Library Doesn't See My Boost
我已经下载了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
我有同样的问题,我下载并提取boost在/usr/include/boost_1_57_0然后我运行
sudo apt-get install libboost-all-dev
然后在目录中我有c++驱动程序,我运行
sudo scons --extrapath=/usr/include/boost_1_57_0
我猜你没有安装库,只是运行。/b2而不是。/b2 install
你能试一下吗?
scons --extrapath="/usr/local/boost_1_51_0/,/usr/local/boost_1_51_0/stage"
我解决了这个问题。
在SCons中,测试boost库的顺序是错误的。
打开SConstruct文件并更改以下行:
boostLibs = [ "regex", "thread", "system" ]
boostLibs = [ "system", "regex", "thread" ]
欢呼,
相关文章:
- 为什么我的 FreeRTOS 任务看不到类成员?
- handleMessage看不到我的类和函数
- 为什么即使链接器找到目标文件,我的程序也看不到函数定义?
- C++概念看到我的类型的函数,但看不到 std::vector 的函数
- QML可以看到我的Q_GADGET,但看不到Q_OBJECT
- 看不到我在 c++ 中传递给另一个函数的主函数中的值
- 我需要创建一个函数在用户下打印"=",但由于变量是使用 main() 声明的,因此函数看不到参数
- 为什么我看不到被捕获的图像
- 为什么在从 c++ 中的函数返回对象的情况下,我看不到正在调用的复制构造函数?
- 为什么Qt看不到我的插槽?
- 我的C++窗口程序运行,但我看不到
- 看不到我的 c++ 程序 (debian) 的输出
- 为什么链接器看不到我的(明确定义的)外部?
- 我看不到从 std::queue 中获取元素的方法
- 为什么我的C++代码看不到这个 C# 类成员?
- Mongo C++客户端库看不到我的提升
- 我的程序执行了正确的#次循环,但是我看不到字符串变量
- Regedit 看不到从我的代码插入的注册表值
- 为什么gcc链接器看不到我的析构函数
- C++ 为什么链接器看不到我的文件?