background.
I usually test my code in both debug and release mode each time I make changes, but forgot for half a day and now I have errors. I had gotten carried away thinking I was in the zone, and left it in release mode, when I realized and tried debug mode... boom!
Win 32 app using windows API.
errors:
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Capture.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >::operator[](unsigned int)const " (??A?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@I@Z)
1>libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __free_dbg
1>Capture.obj : error LNK2019: unresolved external symbol __free_dbg referenced in function "private: void __thiscall std::_Yarn<char>::_Tidy(void)" (?_Tidy@?$_Yarn@D@std@@AAEXXZ)
1>libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol __free_dbg
1>libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol __free_dbg
1>libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol __free_dbg
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(locale0.obj) : error LNK2001: unresolved external symbol __malloc_dbg
1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __malloc_dbg
1>libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype
1>C:\Documents and Settings\SUE\Documents\CPP\networking\networkanalyse \Debug\networkanalyse.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have had these sort of errors before, but always referencing a function/method of my own and have been able to figure it out, but I'm lost here.
In an internet search I found a lot of stuff refering to the code generation runtime library and they are both (release and debug) set to "Multi-threaded (/MT)"
I think all I have done is added a few controls to the gui.
Here command line for release and debug, they are different, but I don't know if that means anything.
Release:
/Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Yu"StdAfx.h" /Fp"Release\networkanalyse.pch" /Fa"Release\" /Fo"Release\" /Fd"Release\vc100.pdb" /Gd /analyze- /errorReport:queue
Debug
/ZI /nologo /W3 /WX- /Od /Oy- /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Gm /EHsc /RTC1 /MT /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yu"StdAfx.h" /Fp"Debug\networkanalyse.pch" /Fa"Debug\" /Fo"Debug\" /Fd"Debug\vc100.pdb" /Gd /analyze- /errorReport:queue
Thank you for reading, I appreciate any help offered.