小编Mic*_*yne的帖子

MongoDB 2.4 C++驱动程序 - 对"SSL_CTX_use_certificate_chain_file"的未定义引用

我正在尝试使用本教程安装C++ MongoDB 2.4驱动程序:http: //docs.mongodb.org/ecosystem/tutorial/getting-started-with-cpp-driver/

我使用scons成功下载并构建了驱动程序源代码.

当我尝试使用推荐的命令编译示例C++文件时:

$ g++ tutorial.cpp -pthread -lmongoclient -lboost_thread-mt -lboost_filesystem -lboost_program_options -lboost_system -o tutorial
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

/usr/lib/gcc/i686-linux-gnu/4.7/../../../../lib/libmongoclient.a(sock.o):
In function `mongo::SSLManager::setupPEM(std::string const&, std::string const&)':
(.text+0xc99): undefined reference to `SSL_CTX_use_certificate_chain_file'
/usr/lib/gcc/i686-linux-gnu/4.7/../../../../lib/libmongoclient.a(sock.o):
In function `mongo::SSLManager::setupPEM(std::string const&, std::string const&)':
(.text+0xceb): undefined reference to `SSL_CTX_set_default_passwd_cb_userdata'
Run Code Online (Sandbox Code Playgroud)

我检查过,我已经安装了这个软件包:libssl1.0.0 libssl-dev.

请帮我!

c++ ubuntu openssl undefined-reference mongodb

2
推荐指数
1
解决办法
1703
查看次数

标签 统计

c++ ×1

mongodb ×1

openssl ×1

ubuntu ×1

undefined-reference ×1