andrewmchugh
New member
I was running a boost ssl project on linux which OpenSSL seems to be less of a ball ache. Since boost requires openssl to be installed, I tired to install it and then use an SSL example to test the installation.
I ran the following commands with VS2010 command prompt with the extracted OpenSSL source (most recent from openssl site) as the working directory.
It all builds without failing (or doesn't flag anything up) but the project fails to compile due to undefined symbols. I know it must be something with the way I built it. But I can see where I could have gone wrong since is so simple. I have deleted the src and build are tired repeating a few times but had no luck. I am literally pulling my hair out it has brought my project to a standstill.
My VS2010 project is setup as follows.
C/C++ > General > Addition Include Directories
E:\libraries\boost_1_49_0 //as used in past projects
E:\usr\local\ssl\include //just installed
Linker > General > Addition Library Directories
E:\libraries\boost_1_49_0\stage\lib
E:\usr\local\ssl\lib
Linker > Input > Addition Directories
libeay32.lib
ssleay32.lib
Source file and header is just osslcrypto from an example.
I ran the following commands with VS2010 command prompt with the extracted OpenSSL source (most recent from openssl site) as the working directory.
Code:
perl Configure VC-WIN64A // no prefix so it just builds to /usr/local
ms\do_win64a
// not using the DLLs but I built them anyway.
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak install
nmake -f ms\nt.mak
nmake -f ms\nt.mak install
It all builds without failing (or doesn't flag anything up) but the project fails to compile due to undefined symbols. I know it must be something with the way I built it. But I can see where I could have gone wrong since is so simple. I have deleted the src and build are tired repeating a few times but had no luck. I am literally pulling my hair out it has brought my project to a standstill.
Code:
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_cleanup referenced in function "bool __cdecl do_encrypt(char const *,unsigned char *,int *,unsigned char *,unsigned char *)" (?do_encrypt@@YA_NPBDPAEPAH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_EncryptFinal_ex referenced in function "bool __cdecl do_encrypt(char const *,unsigned char *,int *,unsigned char *,unsigned char *)" (?do_encrypt@@YA_NPBDPAEPAH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_EncryptUpdate referenced in function "bool __cdecl do_encrypt(char const *,unsigned char *,int *,unsigned char *,unsigned char *)" (?do_encrypt@@YA_NPBDPAEPAH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_EncryptInit_ex referenced in function "bool __cdecl do_encrypt(char const *,unsigned char *,int *,unsigned char *,unsigned char *)" (?do_encrypt@@YA_NPBDPAEPAH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_bf_cbc referenced in function "bool __cdecl do_encrypt(char const *,unsigned char *,int *,unsigned char *,unsigned char *)" (?do_encrypt@@YA_NPBDPAEPAH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_init referenced in function "bool __cdecl do_encrypt(char const *,unsigned char *,int *,unsigned char *,unsigned char *)" (?do_encrypt@@YA_NPBDPAEPAH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_DecryptFinal_ex referenced in function "bool __cdecl do_decrypt(unsigned char const *,unsigned char *,int,unsigned char *,unsigned char *)" (?do_decrypt@@YA_NPBEPAEH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_DecryptUpdate referenced in function "bool __cdecl do_decrypt(unsigned char const *,unsigned char *,int,unsigned char *,unsigned char *)" (?do_decrypt@@YA_NPBEPAEH11@Z)
1>OpenSSLCryptoSample.obj : error LNK2019: unresolved external symbol _EVP_DecryptInit_ex referenced in function "bool __cdecl do_decrypt(unsigned char const *,unsigned char *,int,unsigned char *,unsigned char *)" (?do_decrypt@@YA_NPBEPAEH11@Z)
My VS2010 project is setup as follows.
C/C++ > General > Addition Include Directories
E:\libraries\boost_1_49_0 //as used in past projects
E:\usr\local\ssl\include //just installed
Linker > General > Addition Library Directories
E:\libraries\boost_1_49_0\stage\lib
E:\usr\local\ssl\lib
Linker > Input > Addition Directories
libeay32.lib
ssleay32.lib
Source file and header is just osslcrypto from an example.