1

I have seen many posts on why we get LNK2019 error and how to resolve it but I want to understand the error message which is generated. From reading the message I don't understand from where to begin. Could someone please help me understand which class/method/function etc is the error message referring to and why? Below is the error message. Thanks!

Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall QDir::~QDir(void)" (__imp_??1QDir@@QAE@XZ) referenced in function "int __cdecl DataInOut::writeIqFile(class std::vector,class std::allocator > > &,class std::basic_string,class std::allocator > const &,bool,__int64,bool)" (?writeIqFile@DataInOut@@YAHAAV?$vector@V?$complex@M@std@@V?$allocator@V?$complex@M@std@@@2@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@_N_J2@Z)

  • Well the linker doesn't seem to be able to find the `QDir` destructor. Are you linking with the correct libraries? Qt is split int multiple libraries, linking with only one is not enough if you use functionality from others. – Some programmer dude Oct 24 '17 at 15:41
  • Hi. Thanks for your suggestion. I did add a bunch of libraries reading all the 11 error messages i was getting. But I am still getting the same error messages including the one I got for QDir Destructor. Here is another error message for example(And I have included QString btw) – newbieDevloper Oct 25 '17 at 07:24
  • Error LNK2019 unresolved external symbol "__declspec(dllimport) public: __thiscall QString::QString(void)" (__imp_??0QString@@QAE@XZ) referenced in function "int __cdecl DataInOut::writeIqFile(class std::vector,class std::allocator > > &,class std::basic_string,class std::allocator > const &,bool,__int64,bool)" (?writeIqFile@DataInOut@@YAHAAV?$vector@V?$complex@M@std@@V?$allocator@V?$complex@M@std@@@2@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@_N_J2@Z) – newbieDevloper Oct 25 '17 at 07:27
  • 2
    Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Some programmer dude Oct 25 '17 at 09:41

0 Answers0