1 在 C++ 连接 mongodb 中
insert 的时候 出现 scoped_ptr.hpp:99: T* boost::scoped_ptr<T>::operator->() const [with T = mongo::AtomicWord<unsigned int>]: Assertion `px != 0' failed.
2 在BSONObjBuilder bObj;
bObj.genOID(); 调用后奔溃
解决方案:
在程序启动的时候 客户端初始化
mongo::client::initialize();