0

I have a project that relies in the OpenSSL library that compiles fine on the Linux environment, but I am having trouble having it compile on MS Visual Studio 2015.

I have many errors that look something like "_ specifies undefined struct/union _" where the first blank is a local variable and the second is a reference to something from OpenSSL. I believe that the error is currently coming from not having a proper link to the library from my IDE.

I have downloaded a precompiled version from http://slproweb.com/products/Win32OpenSSL.html and I have set the project's 'Additional Include Directories' to OpenSSL-Win64/include, 'Additional Library Directories' to OpenSSl-Win64/lib, and 'Additional Dependencies' to libssl.lib. - all files or directories that I have gotten through the precompiled package.

Does anyone who has had experience using OpenSSl for Visual Studio projects have any idea as to what my problem is?

Thank you!

  • Use OpenSSL 1.0.2; *not* OpenSSL 1.1.0. Also see [Error: “invalid use of incomplete type ‘RSA {aka struct rsa_st}” in OpenSSL 1.1.0](https://stackoverflow.com/q/40549318/608639), [Visual Studio and error C2027: use of undefined type 'rsa_st' in OpenSSL 1.1.0](https://stackoverflow.com/q/41348281/608639), [EVP_get_cipherbyname and “undefined struct/union evp_cipher_st” in OpenSSL 1.1.0](https://stackoverflow.com/q/41909017/608639), etc. – jww May 31 '17 at 19:35
  • Is there a reason why I should be using 1.0.2 instead? – Zach Choi Jun 01 '17 at 14:36
  • After switching to 1.0.2, I think I've gotten a little further and now I have new errors being messages such as error LNK2001: unresolved external symbol _EVP_DecryptUpdate My additional directories and library directories are still the same, but for my additional dependencies I have only libeay32.lib. Is this the problem? Sorry I am not familiar with the Visual Studio platform – Zach Choi Jun 01 '17 at 14:45

0 Answers0