Why does this fix a warning message?



in stdafx.h?

It's the error mentioned in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/LNK4098.asp

#ifdef DEBUG

#pragma comment(lib, "libcmtd.lib") // multithreaded debug

#else

#pragma comment(lib, "libcmt.lib") // multithreaded release

#endif



In some projects, I get this nasty error, that the wrong library libcmt.lib is linked in debug mode. Since I'm sure, all my compilation options are OK, I wanted to solve this anyway, so I used the macro above.

.



Relevant Pages