Ubuntu和对OpenSSL SSLv2方法的未定义引用

时间:2016-08-03 13:11:45

标签: boost cmake openssl ubuntu-14.04

我正在通过使用cmake链接openssl共享对象来编译我的c ++代码。我收到了编译问题。

In function boost::asio::ssl::context::context(boost::asio::ssl::context_base::method)':
/usr/include/boost/asio/ssl/impl/context.ipp:81: undefined reference to `SSLv2_method'
/usr/include/boost/asio/ssl/impl/context.ipp:84: undefined reference to `SSLv2_client_method'
/usr/include/boost/asio/ssl/impl/context.ipp:87: undefined reference to `SSLv2_server_method'

CMakeFile.txt

find_library(SSL_LIB libssl.so REQUIRED)
find_library(CRYPTO_LIB libcrypto.so REQUIRED)

target_link_libraries (rtcc
    ${RTCC_LIBS}
    ${Boost_LIBRARIES}
    ${SSL_LIB}
    ${CRYPTO_LIB}
)

版本:

Boost : 1.54
*apt-cache policy openssl* gives
Openssl : Installed: 1.0.1f-1ubuntu2.19
ubuntu : 14.04

请你帮我解决这个问题。

0 个答案:

没有答案