可以编译MongoDB 2.0 C++司机

发布于 2024-12-05 07:05:53 字数 1007 浏览 1 评论 0 原文

我尝试构建 mongodb c++ 2.0 驱动程序,但收到以下错误消息:

security_commands.cpp:(.text+0x865): 未定义的引用 mongo::CmdAuthenticate::getUserObj(std::basic_string、std::allocator >常量&, std::basic_string、std::allocator; > const&,mongo::BSONObj&,std::basic_string、std::allocator >&)' security_commands.cpp:(.text+0xa59): 未定义的引用 mongo::CmdAuthenticate::authenticate(std::basic_string, std::allocator > const&, std::basic_string,std::分配器> const&, bool)' mongo/db/security_commands.os: 在函数中 _GLOBAL__sub_I_security_commands.cpp': security_commands.cpp:(.text.startup+0x1a6): 未定义的引用 mongo::CmdLogout' mongo/db/security_common.os 的 vtable:在函数中 `mongo::AuthenticationInfo::_isAuthorized(std::basic_string, std::allocator > const&, int) const':

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,
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::allocator > const&,
std::basic_string, std::allocator >
const&, bool)' mongo/db/security_commands.os: In function
_GLOBAL__sub_I_security_commands.cpp':
security_commands.cpp:(.text.startup+0x1a6): undefined reference to
vtable for mongo::CmdLogout' mongo/db/security_common.os: In function
`mongo::AuthenticationInfo::_isAuthorized(std::basic_string, std::allocator > const&, int) const':

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖伴 2024-12-12 07:05:53

驾驶员的tarball似乎缺少mongo/db/security.cpp文件,以制作共享lib。

但是,它足以构建静态自由,几乎没有缺少符号。

打开sconstruct并发表评论说明

libs += env.sharedlibrary(“蒙古族”,allclientfiles)

然后设置。

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

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

and you are set.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文