0

I am engaged in a legacy project that is written very incomprehensibly. The fact is that the project was written a long time ago and developed for x86. Nevertheless, it starts and works. But since I didn't set up visual studio, it gives the error LNK2019 (unresolved external symbol). Please help me solve this problem! The project really works, just something needs to be done in the project settings, but I don't understand what.

So, I have this three errors:

Error LNK2019 unresolved external symbol "int __stdcall cv::_interlockedExchangeAdd(int *,int)" (?_interlockedExchangeAdd@cv@@YGHPAHH@Z) in function "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@QAEXXZ). Swimm E:\data\study\practice\Swimm\speedDlg.obj 1

Error LNK2019 unresolved external symbol "void __stdcall cv::fastFree(void *)" (?fastFree@cv@@YGXPAX@Z) in function "public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ). Swimm E:\data\study\practice\Swimm\speedDlg.obj 1

Error LNK1120 unresolved externals: 2 Swimm E:\data\study\practice\Swimm\Debug\Swimm.exe 1

I understand, that LNK1120 error is due to the presence of LNK2019 errors

  • You need to check every LNK2019 error and find out a proper library. Could you provide some example? – KoVadim Apr 19 '22 at 10:04
  • Add your linker error(s) to your question. Verbatim, as text, not as an image, and not in the comments. – Paul Sanders Apr 19 '22 at 10:32
  • 1
    Looks like your code forgot to link to opencv libraries. You set this in Linker->Input->Additional Dependencies. And since you mention a long time ago. Visual Studio 2015 to 2022 are binary compatible with each other but not compatible with any other version of msvc. Also all versions of mscv before 2015 are incompatible with each other so you must use the proper binaries for your compiler version. – drescherjm Apr 19 '22 at 12:10

0 Answers0