Problem when linking error LNK2019

I was finishing the project when in the end it game me this error:


1>Linking...
1>bankingSystem.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall Account::GetAccountID(void)" (?GetAccountID@Account@@QAEIXZ) referenced in function "private: unsigned int __thiscall BankingSystem::FindAccount(unsigned int)" (?FindAccount@BankingSystem@@AAEII@Z)
1>bankingSystem.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall Account::GetPasscode(void)" (?GetPasscode@Account@@QAEIXZ) referenced in function "private: bool __thiscall BankingSystem::MatchPasscode(unsigned int,unsigned int)" (?MatchPasscode@BankingSystem@@AAE_NII@Z)
1>bankingSystem.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Account::GetLastName(void)" (?GetLastName@Account@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: void __thiscall BankingSystem::PrintAccounts(void)" (?PrintAccounts@BankingSystem@@QAEXXZ)
1>bankingSystem.obj : error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall Account::GetFirstName(void)" (?GetFirstName@Account@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function "public: void __thiscall BankingSystem::PrintAccounts(void)" (?PrintAccounts@BankingSystem@@QAEXXZ)
1>bankingSystem.obj : error LNK2019: unresolved external symbol "public: double __thiscall Account::GetBalance(void)" (?GetBalance@Account@@QAENXZ) referenced in function "public: void __thiscall BankingSystem::PrintAccounts(void)" (?PrintAccounts@BankingSystem@@QAEXXZ)
1>C:\Users\GxPinheiro\Dropbox\Programing 1\Project 2\Debug\Project 2.exe : fatal error LNK1120: 5 unresolved externals


Last edited on
"unresolved external symbol" means you are calling a function, but the linker can't find a body for that function.

The rest of the error message tells you exactly which function it can't find. (with some name mangling). So that first one is Account::GetAccountID().


So yeah... go through and make sure you give all of those functions a body.
nolyc wrote:
You did not define the thing in the error message, you forgot to link the file that defines it, you forgot to link to the library that defines it, or, if it's a static library, you have the wrong order on the linker command line.
Check which one.
Topic archived. No new replies allowed.