0

I'm trying to use OpenSSL in my .C file, the include lines look like this:

#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/aes.h>

However, I get the error:

openssl/conf.h: no file or directory

The library is located at "C:\Program Files (x86)\OpenSSL" and its include files are located at "C:\Program Files (x86)\OpenSSL\include". How do I link this library while compiling with MSVC?

James
  • 127
  • 11
  • Have you specified [additional include directories](https://learn.microsoft.com/en-us/cpp/build/reference/i-additional-include-directories?view=msvc-160) ? – Mark Benningfield May 21 '21 at 14:57
  • @MarkBenningfield This fixes the include errors, however now I cant seem to link the library. I get: error LNK2019 un resolver external symbol referenced in function main. – James May 21 '21 at 15:32
  • See [this](https://stackoverflow.com/a/4446085/500276) answer – Mark Benningfield May 21 '21 at 16:10
  • @MarkBenningfield unfortunately my folder is not a project, is there anyway to do this directly from command line? Thanks again. – James May 21 '21 at 16:15

0 Answers0