Tôi đang cố gắng biên dịch máy chủ SSL 1.47 ASIO và các ví dụ ứng dụng khách. Tôi có thể kết hợp thành công Boost vào dự án của mình, nhưng tôi không thể kết hợp OpenSSL. Khi tôi cố gắng thêm nó tôi nhận được lỗi:Tăng SSL với Visual Studio 2010 và OpenSSL
1>SSLServer.obj : error LNK2019: unresolved external symbol _ERR_reason_error_string referenced in function "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall boost::asio::error::detail::ssl_category::message(int)const " ([email protected][email protected]@[email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _CRYPTO_set_id_callback referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _CRYPTO_set_locking_callback referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _CRYPTO_num_locks referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _SSL_load_error_strings referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _SSL_library_init referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _ENGINE_cleanup referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _CONF_modules_unload referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _CRYPTO_cleanup_all_ex_data referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _EVP_cleanup referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _ERR_remove_state referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>SSLServer.obj : error LNK2019: unresolved external symbol _ERR_free_strings referenced in function "public: __thiscall boost::asio::ssl::detail::openssl_init_base::do_init::~do_init(void)" ([email protected][email protected]@[email protected]@[email protected]@[email protected])
1>C:\Users\Epicism\Documents\Visual Studio 2010\Projects\SSLServer\Debug\SSLServer.exe : fatal error LNK1120: 12 unresolved externals
1>
1>Build FAILED.
Tôi đã thử thêm vào thư mục C: \ OpenSSL-Win32 \ lib \, C: \ OpenSSL-Win32 \ lib \ VC \, C: \ OpenSSL -Win32 \ lib \ VC \ static, C: \ OpenSSL-Win32 \ bin, C: \ OpenSSL-Win32 \ bao gồm Project-> General Properties-> Linker-> Thư viện Thư viện Bổ sung bằng cách sử dụng các thư viện được biên dịch trước openssl (http: //www.openssl.org/related/binaries.html). Tôi cũng đã cố gắng biên dịch OpenSSL bản thân mình với các lỗi tương tự. Tôi thực sự thua lỗ, tôi đã thử mọi thứ tôi đã tìm kiếm trên Google hàng nghìn lần, đã thử IRC, mọi kết hợp các thư mục mà tôi có thể nghĩ đến ...
Thiết lập của tôi là: Windows 7 64-bit Windows Visual Studio 2010 64 bit Tăng 1.47 OpenSSL 1.0.0E và G C/C++ Thư mục bao gồm bổ sung: C: \ Program Files (x86) \ boost \ boost_1_47; C: \ openssl \ include \; C: \ OpenSSL- Win32 \ lib;% (AdditionalIncludeDirectories) Project-> General Properties-> Linker-> Thư viện Thư viện Bổ sung: C: \ Program Files (x86) \ boost \ boost_1_47 \ lib; C: \ openssl \ lib; C: \ openssl; % (AdditionalLibraryDirectories) - Tôi đã thử thêm mọi thư mục vào thuộc tính này ....
Ngay bây giờ tôi chỉ cố gắng để biên dịch sau đây trong một giao diện điều khiển dự án VS C++:
// SSLServer.cpp: Xác định điểm mấu chốt cho các ứng dụng giao diện điều khiển. //
#include "stdafx.h"
#include <cstdlib>
#include <iostream>
#include <boost/bind.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
Xin cảm ơn trước.
CÓ tôi quá Tôi có vấn đề này như welll – jzeus
Tôi cũng gặp vấn đề này. Có ai quản lý để tìm ra nó? Xin vui lòng gửi trở lại nếu bạn làm. Đã thử đề nghị của Fraser dưới đây, nhưng vẫn có vấn đề. –