We help IT Professionals succeed at work.

VS.NET 2008 Compiling -> unresolved external symbol

sgaggerj
sgaggerj asked
on
Hi Experts,

I'm trying to compile a project that has recently been re-organized by it's creators.  (It used to compile fine with no problems.)
Since the reorganization, the devs say its fine however I'm having trouble getting it to compile (and there's little to no support available).

I'm getting a bunch of unresolved external symbol errors when compiling.  I was under the impression that it means that it can't find a certain file.  I added the paths to the VC directories, with no luck.  I'm wondering if I missed something.

Below is the list of errors that i'm getting.

I'm using VS 2008

Any help in getting this straightened out is greatly appreciated!

If you need more information to be able to help, let me know and I'll provide what I can.

...
7>WinCorePCH.cpp
8>Compiling resources...
8>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
8>Copyright (C) Microsoft Corporation.  All rights reserved.
8>Linking...
8>AuthSocket.obj : error LNK2019: unresolved external symbol _CRYPTO_free referenced in function "public: void __thiscall AuthSocket::_SetVSFields(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?_SetVSFields@AuthSocket@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
8>AuthSocket.obj : error LNK2019: unresolved external symbol _MD5_Final referenced in function "public: void __thiscall Patcher::LoadPatchMD5(char *)" (?LoadPatchMD5@Patcher@@QAEXPAD@Z)
8>AuthSocket.obj : error LNK2019: unresolved external symbol _MD5_Update referenced in function "public: void __thiscall Patcher::LoadPatchMD5(char *)" (?LoadPatchMD5@Patcher@@QAEXPAD@Z)
8>AuthSocket.obj : error LNK2019: unresolved external symbol _MD5_Init referenced in function "public: void __thiscall Patcher::LoadPatchMD5(char *)" (?LoadPatchMD5@Patcher@@QAEXPAD@Z)
8>Main.obj : error LNK2019: unresolved external symbol _SSLeay_version referenced in function "int __cdecl ace_main_i(int,char * * const)" (?ace_main_i@@YAHHQAPAD@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_new referenced in function "public: __thiscall BigNumber::BigNumber(void)" (??0BigNumber@@QAE@XZ)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_dup referenced in function "public: __thiscall BigNumber::BigNumber(class BigNumber const &)" (??0BigNumber@@QAE@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_set_word referenced in function "public: __thiscall BigNumber::BigNumber(unsigned int)" (??0BigNumber@@QAE@I@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_free referenced in function "public: __thiscall BigNumber::~BigNumber(void)" (??1BigNumber@@QAE@XZ)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_lshift referenced in function "public: void __thiscall BigNumber::SetQword(unsigned __int64)" (?SetQword@BigNumber@@QAEX_K@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_add_word referenced in function "public: void __thiscall BigNumber::SetQword(unsigned __int64)" (?SetQword@BigNumber@@QAEX_K@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bin2bn referenced in function "public: void __thiscall BigNumber::SetBinary(unsigned char const *,int)" (?SetBinary@BigNumber@@QAEXPBEH@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_hex2bn referenced in function "public: void __thiscall BigNumber::SetHexStr(char const *)" (?SetHexStr@BigNumber@@QAEXPBD@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_rand referenced in function "public: void __thiscall BigNumber::SetRand(int)" (?SetRand@BigNumber@@QAEXH@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_copy referenced in function "public: class BigNumber __thiscall BigNumber::operator=(class BigNumber const &)" (??4BigNumber@@QAE?AV0@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_add referenced in function "public: class BigNumber __thiscall BigNumber::operator+=(class BigNumber const &)" (??YBigNumber@@QAE?AV0@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_sub referenced in function "public: class BigNumber __thiscall BigNumber::operator-=(class BigNumber const &)" (??ZBigNumber@@QAE?AV0@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_CTX_free referenced in function "public: class BigNumber __thiscall BigNumber::operator*=(class BigNumber const &)" (??XBigNumber@@QAE?AV0@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_mul referenced in function "public: class BigNumber __thiscall BigNumber::operator*=(class BigNumber const &)" (??XBigNumber@@QAE?AV0@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_CTX_new referenced in function "public: class BigNumber __thiscall BigNumber::operator*=(class BigNumber const &)" (??XBigNumber@@QAE?AV0@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_div referenced in function "public: class BigNumber __thiscall BigNumber::operator/=(class BigNumber const &)" (??_0BigNumber@@QAE?AV0@ABV0@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_exp referenced in function "public: class BigNumber __thiscall BigNumber::Exp(class BigNumber const &)" (?Exp@BigNumber@@QAE?AV1@ABV1@@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_mod_exp referenced in function "public: class BigNumber __thiscall BigNumber::ModExp(class BigNumber const &,class BigNumber const &)" (?ModExp@BigNumber@@QAE?AV1@ABV1@0@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_num_bits referenced in function "public: int __thiscall BigNumber::GetNumBytes(void)" (?GetNumBytes@BigNumber@@QAEHXZ)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_get_word referenced in function "public: unsigned int __thiscall BigNumber::AsDword(void)" (?AsDword@BigNumber@@QAEIXZ)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bn2bin referenced in function "public: unsigned char * __thiscall BigNumber::AsByteArray(int,bool)" (?AsByteArray@BigNumber@@QAEPAEH_N@Z)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bn2hex referenced in function "public: char const * __thiscall BigNumber::AsHexStr(void)" (?AsHexStr@BigNumber@@QAEPBDXZ)
8>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bn2dec referenced in function "public: char const * __thiscall BigNumber::AsDecStr(void)" (?AsDecStr@BigNumber@@QAEPBDXZ)
8>shared.lib(SHA1.obj) : error LNK2019: unresolved external symbol _SHA1_Init referenced in function "public: __thiscall Sha1Hash::Sha1Hash(void)" (??0Sha1Hash@@QAE@XZ)
8>shared.lib(SHA1.obj) : error LNK2019: unresolved external symbol _SHA1_Update referenced in function "public: void __thiscall Sha1Hash::UpdateData(unsigned char const *,int)" (?UpdateData@Sha1Hash@@QAEXPBEH@Z)
8>shared.lib(SHA1.obj) : error LNK2019: unresolved external symbol _SHA1_Final referenced in function "public: void __thiscall Sha1Hash::Finalize(void)" (?Finalize@Sha1Hash@@QAEXXZ)
8>..\..\bin\Win32_Release\TrinityRealm.exe : fatal error LNK1120: 31 unresolved externals
7>        c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h(713) : see declaration of 'tempnam'
8>Build log was saved at "file://c:\Data\Servers\Game\WoW\Data\TC2\win\VC90\trinityrealm__Win32_Release\BuildLog.htm"
8>TrinityRealm - 32 error(s), 10 warning(s)
...
9>CliRunnable.cpp
9>Compiling resources...
9>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
9>Copyright (C) Microsoft Corporation.  All rights reserved.
9>Linking...
9>   Creating library .\trinitycore__Win32_Release\TrinityCore.lib and object .\trinitycore__Win32_Release\TrinityCore.exp
9>Main.obj : error LNK2019: unresolved external symbol _SSLeay_version referenced in function "int __cdecl ace_main_i(int,char * * const)" (?ace_main_i@@YAHHQAPAD@Z)
9>game.lib(WorldSocket.obj) : error LNK2019: unresolved external symbol _CRYPTO_free referenced in function "private: int __thiscall WorldSocket::HandleAuthSession(class WorldPacket &)" (?HandleAuthSession@WorldSocket@@AAEHAAVWorldPacket@@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_new referenced in function "public: __thiscall BigNumber::BigNumber(void)" (??0BigNumber@@QAE@XZ)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_dup referenced in function "public: __thiscall BigNumber::BigNumber(class BigNumber const &)" (??0BigNumber@@QAE@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_set_word referenced in function "public: __thiscall BigNumber::BigNumber(unsigned int)" (??0BigNumber@@QAE@I@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_free referenced in function "public: __thiscall BigNumber::~BigNumber(void)" (??1BigNumber@@QAE@XZ)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_lshift referenced in function "public: void __thiscall BigNumber::SetQword(unsigned __int64)" (?SetQword@BigNumber@@QAEX_K@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_add_word referenced in function "public: void __thiscall BigNumber::SetQword(unsigned __int64)" (?SetQword@BigNumber@@QAEX_K@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bin2bn referenced in function "public: void __thiscall BigNumber::SetBinary(unsigned char const *,int)" (?SetBinary@BigNumber@@QAEXPBEH@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_hex2bn referenced in function "public: void __thiscall BigNumber::SetHexStr(char const *)" (?SetHexStr@BigNumber@@QAEXPBD@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_rand referenced in function "public: void __thiscall BigNumber::SetRand(int)" (?SetRand@BigNumber@@QAEXH@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_copy referenced in function "public: class BigNumber __thiscall BigNumber::operator=(class BigNumber const &)" (??4BigNumber@@QAE?AV0@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_add referenced in function "public: class BigNumber __thiscall BigNumber::operator+=(class BigNumber const &)" (??YBigNumber@@QAE?AV0@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_sub referenced in function "public: class BigNumber __thiscall BigNumber::operator-=(class BigNumber const &)" (??ZBigNumber@@QAE?AV0@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_CTX_free referenced in function "public: class BigNumber __thiscall BigNumber::operator*=(class BigNumber const &)" (??XBigNumber@@QAE?AV0@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_mul referenced in function "public: class BigNumber __thiscall BigNumber::operator*=(class BigNumber const &)" (??XBigNumber@@QAE?AV0@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_CTX_new referenced in function "public: class BigNumber __thiscall BigNumber::operator*=(class BigNumber const &)" (??XBigNumber@@QAE?AV0@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_div referenced in function "public: class BigNumber __thiscall BigNumber::operator/=(class BigNumber const &)" (??_0BigNumber@@QAE?AV0@ABV0@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_exp referenced in function "public: class BigNumber __thiscall BigNumber::Exp(class BigNumber const &)" (?Exp@BigNumber@@QAE?AV1@ABV1@@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_mod_exp referenced in function "public: class BigNumber __thiscall BigNumber::ModExp(class BigNumber const &,class BigNumber const &)" (?ModExp@BigNumber@@QAE?AV1@ABV1@0@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_num_bits referenced in function "public: int __thiscall BigNumber::GetNumBytes(void)" (?GetNumBytes@BigNumber@@QAEHXZ)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_get_word referenced in function "public: unsigned int __thiscall BigNumber::AsDword(void)" (?AsDword@BigNumber@@QAEIXZ)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bn2bin referenced in function "public: unsigned char * __thiscall BigNumber::AsByteArray(int,bool)" (?AsByteArray@BigNumber@@QAEPAEH_N@Z)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bn2hex referenced in function "public: char const * __thiscall BigNumber::AsHexStr(void)" (?AsHexStr@BigNumber@@QAEPBDXZ)
9>shared.lib(BigNumber.obj) : error LNK2019: unresolved external symbol _BN_bn2dec referenced in function "public: char const * __thiscall BigNumber::AsDecStr(void)" (?AsDecStr@BigNumber@@QAEPBDXZ)
9>shared.lib(SHA1.obj) : error LNK2019: unresolved external symbol _SHA1_Init referenced in function "public: __thiscall Sha1Hash::Sha1Hash(void)" (??0Sha1Hash@@QAE@XZ)
9>shared.lib(SHA1.obj) : error LNK2019: unresolved external symbol _SHA1_Update referenced in function "public: void __thiscall Sha1Hash::UpdateData(unsigned char const *,int)" (?UpdateData@Sha1Hash@@QAEXPBEH@Z)
9>shared.lib(SHA1.obj) : error LNK2019: unresolved external symbol _SHA1_Final referenced in function "public: void __thiscall Sha1Hash::Finalize(void)" (?Finalize@Sha1Hash@@QAEXXZ)
9>shared.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_set_key_length referenced in function "public: __thiscall SARC4::SARC4(unsigned char)" (??0SARC4@@QAE@E@Z)
9>shared.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_EncryptInit_ex referenced in function "public: __thiscall SARC4::SARC4(unsigned char)" (??0SARC4@@QAE@E@Z)
9>shared.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_rc4 referenced in function "public: __thiscall SARC4::SARC4(unsigned char)" (??0SARC4@@QAE@E@Z)
9>shared.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_init referenced in function "public: __thiscall SARC4::SARC4(unsigned char)" (??0SARC4@@QAE@E@Z)
9>shared.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_cleanup referenced in function "public: __thiscall SARC4::~SARC4(void)" (??1SARC4@@QAE@XZ)
9>shared.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_EncryptFinal_ex referenced in function "public: void __thiscall SARC4::UpdateData(int,unsigned char *)" (?UpdateData@SARC4@@QAEXHPAE@Z)
9>shared.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_EncryptUpdate referenced in function "public: void __thiscall SARC4::UpdateData(int,unsigned char *)" (?UpdateData@SARC4@@QAEXHPAE@Z)
9>shared.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _HMAC_Init_ex referenced in function "public: __thiscall HmacHash::HmacHash(unsigned int,unsigned char *)" (??0HmacHash@@QAE@IPAE@Z)
9>shared.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _EVP_sha1 referenced in function "public: __thiscall HmacHash::HmacHash(unsigned int,unsigned char *)" (??0HmacHash@@QAE@IPAE@Z)
9>shared.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _HMAC_CTX_init referenced in function "public: __thiscall HmacHash::HmacHash(unsigned int,unsigned char *)" (??0HmacHash@@QAE@IPAE@Z)
9>shared.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _HMAC_CTX_cleanup referenced in function "public: __thiscall HmacHash::~HmacHash(void)" (??1HmacHash@@QAE@XZ)
9>shared.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _HMAC_Update referenced in function "public: void __thiscall HmacHash::UpdateData(unsigned char const *,int)" (?UpdateData@HmacHash@@QAEXPBEH@Z)
9>shared.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _HMAC_Final referenced in function "public: void __thiscall HmacHash::Finalize(void)" (?Finalize@HmacHash@@QAEXXZ)
9>..\..\bin\Win32_Release\TrinityCore.exe : fatal error LNK1120: 41 unresolved externals
9>Build log was saved at "file://c:\Data\Servers\Game\WoW\Data\TC2\win\VC90\trinitycore__Win32_Release\BuildLog.htm"
9>TrinityCore - 42 error(s), 10 warning(s)
========== Rebuild All: 7 succeeded, 2 failed, 0 skipped ==========

Open in new window

Comment
Watch Question

Commented:
You need to add a library/libraries. It is in the project settings: Linker->Input->Additional Dependencies.

Or in the source code
 #pragma comment( lib, "crypto.lib" )

Author

Commented:
Yea, you're right.  I just found a copy of one of the libraries supplied by the devs and replaced the one i was using.

That fixed the errors here.

Thanks!