I tried to build mongodb c++ 2.0 driver,but got the following error message:
security_commands.cpp:(.text+0x865): undefined reference to
mongo::CmdAuthenticate::getUserObj(std::basic_string<char,mongo::CmdAuthenticate::authenticate(std::basic_string, std::allocator > const&,
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
std::basic_string, std::allocator >
const&, bool)’ mongo/db/security_commands.os: In function
_GLOBAL__sub_I_security_commands.cpp':vtable for mongo::CmdLogout’ mongo/db/security_common.os: In function
security_commands.cpp:(.text.startup+0x1a6): undefined reference to
`mongo::AuthenticationInfo::_isAuthorized(std::basic_string, std::allocator > const&, int) const’:
The tarball for the driver seems to be missing mongo/db/security.cpp file among others to make a shared lib.
But, it has enough for building static lib with few missing symbol.
open SConstruct and comment out the line saying
and you are set.