1
votes

I compiled boost with bjam, and then I compiled OpenSSL. Both of them work separately.

I set up the links in Visual Studio 10 to point to my OpenSSL library directory.

But when I attempt to compile example boost ssl asio programs I get 44 unresolved external linker errors like this one:

1>testing.obj : error LNK2019: unresolved external symbol _SSLv23_server_method referenced in function "public: void __thiscall boost::asio::ssl::detail::openssl_context_service::create(struct ssl_ctx_st * &,enum boost::asio::ssl::context_base::method)" (?create@openssl_context_service@detail@ssl@asio@boost@@QAEXAAPAUssl_ctx_st@@W4method@context_base@345@@Z)

Can you please give me step-by-step instructions on properly linking OpenSSL to boost? Thank you so much

1
I'm not familiar with Visual Studio or Windows, but when using Boost.Asio and OpenSSL on Linux you have to add -lssl to your LDFLAGS. - Sam Miller

1 Answers

4
votes

For VS 2008, add the C:\OpenSSL-Win32\include and C:\OpenSSL-Win32\lib directories to Visual Studio's paths, then add ssleay32.lib libeay32.lib to the Linker/Input/Additional Dependencies option in the project's settings. I would assume that VS 2010 is the same.