C++ 使用OpenSSL构建LibCurl会导致链接器错误

C++ 使用OpenSSL构建LibCurl会导致链接器错误,c++,curl,static-libraries,libcurl,C++,Curl,Static Libraries,Libcurl,我已经尝试用SSL支持构建LibCurl两天了,我已经遵循了互联网上的每一个指南,谷歌的错误已经持续了几个小时。我终于把它编译好了,但是当我链接到它时,我得到了下面列出的链接器错误 我正在和…一起建房子 nmake -f Makefile.vc9 OPENSSL_PATH=c:\dev_mms\openSSL RTLIBCFG=static CFG=release-ssl 下面的错误,当我用谷歌搜索时,他们说OpenSSL LIB没有正确链接,但我查看了Makefile.vc9,它肯定包含了O

我已经尝试用SSL支持构建LibCurl两天了,我已经遵循了互联网上的每一个指南,谷歌的错误已经持续了几个小时。我终于把它编译好了,但是当我链接到它时,我得到了下面列出的链接器错误

我正在和…一起建房子

nmake -f Makefile.vc9 OPENSSL_PATH=c:\dev_mms\openSSL RTLIBCFG=static CFG=release-ssl
下面的错误,当我用谷歌搜索时,他们说OpenSSL LIB没有正确链接,但我查看了Makefile.vc9,它肯定包含了OpenSSL的正确LIB。以下是链接器错误(我删除了大约50个错误只是为了缩短它),我能做些什么来解决这些错误

1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _RAND_status referenced in function _rand_enough
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _RAND_file_name referenced in function _ossl_seed
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _RAND_load_file referenced in function _ossl_seed
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_CTX_check_private_key referenced in function _cert_stuff
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_free referenced in function _cert_stuff
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _BN_num_bits referenced in function _get_cert_chain
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _X509_get_serialNumber referenced in function _get_cert_chain
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _ASN1_INTEGER_get referenced in function _get_cert_chain
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _X509_get_issuer_name referenced in function _get_cert_chain
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_get_peer_cert_chain referenced in function _get_cert_chain
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _X509_verify_cert_error_string referenced in function _servercert
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_get_verify_result referenced in function _servercert
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _X509_check_issued referenced in function _servercert
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _PEM_read_X509 referenced in function _servercert
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _X509_free referenced in function _servercert
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_get_peer_certificate referenced in function _servercert
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_get1_session referenced in function _ossl_connect_step3
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_pending referenced in function _Curl_ossl_data_pending
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSL_write referenced in function _ossl_send
1>libcurl.lib(ssluse.obj) : error LNK2019: unresolved external symbol _SSLeay referenced in function _Curl_ossl_version
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _DES_set_key referenced in function _setup_des_key
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _DES_set_odd_parity referenced in function _setup_des_key
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _DES_ecb_encrypt referenced in function _lm_resp
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _MD4_Final referenced in function _mk_nt_hash
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _MD4_Update referenced in function _mk_nt_hash
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _MD4_Init referenced in function _mk_nt_hash
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _MD5_Final referenced in function _Curl_output_ntlm
1>libcurl.lib(md5.obj) : error LNK2001: unresolved external symbol _MD5_Final
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _MD5_Update referenced in function _Curl_output_ntlm
1>libcurl.lib(md5.obj) : error LNK2001: unresolved external symbol _MD5_Update
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _MD5_Init referenced in function _Curl_output_ntlm
1>libcurl.lib(md5.obj) : error LNK2001: unresolved external symbol _MD5_Init
1>libcurl.lib(http_ntlm.obj) : error LNK2019: unresolved external symbol _RAND_bytes referenced in function _Curl_output_ntlm

我已经按照问题197444()答案中的说明进行了操作,它就像一场梦

试一试,让我知道进展如何。

您需要添加

 libeay32.lib ssleay32.lib
添加到项目配置中的其他依赖项