Наткнулся на проблему — что stl std::vector не хочет компилиться с опцией /MT, линкер выдает сообщение:
>Compiling...
1>cl : Command line warning D9025 : overriding '/MDd' with '/MT'
1>cl : Command line warning D9025 : overriding '/W3' with '/W1'
1>stdafx.cpp
1>Compiling...
1>cl : Command line warning D9025 : overriding '/MDd' with '/MT'
1>cl : Command line warning D9025 : overriding '/W3' with '/W1'
1>STLtest.cpp
1>Linking...
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
1>D:\VStudioProjects\STLtest\Debug\STLtest.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://d:\VStudioProjects\STLtest\STLtest\Debug\BuildLog.htm"
1>STLtest — 4 error(s), 5 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
а вот и сама программка:
#include "stdafx.h"
#include <vector>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
vector <int> Vec;
return 0;
}
а вот с /MD опицией все ок. Не пойму в чем дело?