`
ribishuangba
  • 浏览: 289991 次
文章分类
社区版块
存档分类
最新评论

Ubuntu编译MongoDB client library

 
阅读更多

要有boost库。

1.download cxx-driver for 1.8,unzip to /usr/src folder



2.sudo apt-get install libpcre3-dev


3.sudo apt-get install scons

chenshu@chenshu-ubuntu:/usr/local/src/mongo-cxx-driver-v1.8$

如有必要配置SConstruct文件,比如boost库位于/usr/lib下面的话,要将配置从/usr/local改为/usr


4.如果没有安装到/usr/lib目录下,则用下面命令复制一下

sudo cp libmongoclient.* /usr/lib/


5.如果开发的时候想调试进入源代码看看,需要在SConstruct文件中找到if linux,然后添加一行 -g参数。


if linux:
env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
env.Append( CPPFLAGS=" -g " )
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics