I have a VS2012 project using the debug version of the MD built libraries (PocoFoundationmdd.lib etc.). #POCO_STATIC is defined - and all is good.
When compiling in Release mode, I am using the release version of the same libraries (PocoFoundationmd.lib) - but VS2012 then suddenly refuses to link and asks for the MT version instead (PocoFoundationmt.lib )
error LNK1104: cannot open file 'PocoFoundationmt.lib'
What's causing POCO/VS to look for the MT version instead of the MD version in Release mode? Any ideas?
Here's the linker command that VS2012 uses in DEBUG mode (which works)
/OUT:"C:\xxx...\xxx.dll" /MANIFEST /NXCOMPAT /PDB:"C:\xxx...\xxx.pdb" /DYNAMICBASE "ssleay32.lib" "libeay32.lib" "cpprest120d_2_8.lib" "log4cppD.lib" "winhttp.lib" "Crypt32.lib" "Bcrypt.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /IMPLIB:"C:\xxx...\xxx.lib" /DEBUG /DLL /MACHINE:X86 /INCREMENTAL /PGD:"C:\xxx...\xxx.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Debug\xxx.dll.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"..\libs\Poco\Debug" /TLBID:1
.. and here's the linker command for RELEASE mode (which doesn't work)
/OUT:"C:\xxx...\xxx.dll" /MANIFEST /LTCG /NXCOMPAT /PDB:"C:\xxx...\xxx.pdb" /DYNAMICBASE "ssleay32.lib" "libeay32.lib" "cpprest120_2_8.lib" "log4cppLIB.lib" "winhttp.lib" "Crypt32.lib" "Bcrypt.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" /IMPLIB:"C:\xxx...\xxx.lib" /DEBUG /DLL /MACHINE:X86 /OPT:REF /SAFESEH /INCREMENTAL:NO /PGD:"C:\xxx...\xxx.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Release\xxx.dll.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /LIBPATH:"..\libs\Poco\Release" /TLBID:1