2011-09-18 39 views
0

我試圖建立的MongoDB C++ 2.0驅動程序,但有以下錯誤信息:不能編譯的MongoDB 2.0 C++司機

security_commands.cpp :(文字+ 0x865):未定義參考 mongo::CmdAuthenticate::getUserObj(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, mongo::BSONObj&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' security_commands.cpp:(.text+0xa59): undefined reference to 蒙戈:: CmdAuthenticate ::的authenticate(性病:: basic_string的,標準::分配器>常量&, 的std :: basic_string的,標準::分配器> 常量&,布爾)」蒙戈/分貝/ security_commands.os:在功能 _GLOBAL__sub_I_security_commands.cpp': security_commands.cpp:(.text.startup+0x1a6): undefined reference to vim for mongo :: CmdLogout'mongo/db/security_common.os:在函數 `mongo :: AuthenticationInfo :: _ isAut horized(性病:: basic_string的,性病::分配器>常量&,INT)常量「:

+1

你沒有鏈接到正確的庫 – flumpb

回答

1

驅動程序壓縮包似乎缺少等等蒙戈/ DB/security.cpp文件做一個共享庫。

但是,它足夠用於構建帶有少量缺失符號的靜態庫。

開放SConstruct和註釋掉該行稱

庫+ = env.SharedLibrary( 「mongoclient」,allClientFiles)

和你設置。