2011-09-18 7 views
0

J'ai essayé de construire mongodb C++ 2.0 pilote, mais reçu le message d'erreur suivant:Impossible de compiler MongoDB 2.0 C++ pilote

security_commands.cpp :(texte + 0x865):. Undefined reference to 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 mongo :: CmdAuthenticate :: authenticate (std :: basic_string, std :: allocateur> const &, std :: basic_string, std :: allocateur> const &, bool) » mongo/db/security_commands.os: En fonction _GLOBAL__sub_I_security_commands.cpp': security_commands.cpp:(.text.startup+0x1a6): undefined reference to vtable pour mongo :: CmdLogout 'mongo/db/security_common.os: Dans la fonction `mongo :: AuthenticationInfo :: _ isAut horized (std :: basic_string, std :: allocateur> const &, int) const ':

+1

Vous n'êtes pas lié aux bibliothèques correctes – flumpb

Répondre

1

Le tarball pour le conducteur semble manquer mongo/db/fichier security.cpp entre autres pour faire un lib partagé . Mais, il en a assez pour construire une librairie statique avec peu de symboles manquants.

SConstruct ouvert et commentez la ligne en disant

libs + = env.SharedLibrary ("mongoclient", allClientFiles)

et vous définissez.