Hi All,
I am facing a very unique problem while compling my project in
"Release" build.
The project is building in DEBUG mode but giving linking error on
Release build.
Here is the error:
Creating library Release/fnimqcmd.lib and object
Release/fnimqcmd.exp
CoIMQCmd.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) private: void __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char::_Tidy(unsigned short)"
(__imp_?_Tidy@?$basic_string@DU?$char_
traits@D@std@@V?$allocator@D@2@@std@@AAEXG@Z)
CoIMQCmd.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) private: unsigned short __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char::_Grow(unsigned int,unsigned short)"
(__imp_?_Grow@?
$basic_string@DU?$char_traits@D@std@@V?$allocator@ D@2@@std@@AAEGIG@Z)
Release/fnimqcmd.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
My project is a MFC extension DLL using "Use MFC in shared DLL". I
started running into this problem when I have used STL::vector in my
project. Somehow I feel that this is the cause of the problem but not
able to locate the reasons.
Furthermore, I am able to compile the project in "Debug"
confiiguration. In "Release" configuration if we turn off the
optimization i.e project settings->Optimization-Disable(Debug) we are
able to link it successfully.
Following are some more project settings under C/C++ tab->Code
generation:-
Processor->Blend*
Use run-time library-Multithreaded DLL(/MD)
Calling Conventions -__cdecl*
My product build is being stucked due to this project so an early
response would be highly appreciated.
Thanks in advance.
Regards
Deepak