Visual C++ 2019 link error: lld-link: : error : undefined symbol: __declspec(dllimport) public: static void __cdecl ATL::CSimpleStringT<wchar_t, 1>

hyperandey 21 Reputation points
2023-04-12T00:34:28.65+00:00

I am building release version of OpenMP C++ codes with Visual Studio 2019. The debug version ran pretty well but the release version ended up with some strange linker error: "1>lld-link: : error : undefined symbol: __declspec(dllimport) public: static void __cdecl ATL::CSimpleStringT<wchar_t, 1>::CopyChars(wchar_t *, unsigned __int64, wchar_t const *, int)" I am using Intel one API DPC C++/C++ Compiler with support of OpenMP 5.x. I use some CString, TCHAR inside the codes but I do not think those caused the problem as I did a simple mockup OpenMP program with CString and TCHAR under same project configuration properties setting. The compilation and link were fine. I really don't know what caused this link error. My old program without OpenMP was built perfectly without problem. The mock up program I ran with successful built-up is as follows: Can someone give me a hint on how to resolve this linker error? Thanks.



Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,888 questions
{count} votes