Release Build:
/MT means the C release mode runtime library is statically linked
/MD means the C release mode runtime library is dynamically linked via DLL
Debug Build:
/MTd means the C debug mode runtime library is statically linked
/MDd means the C debug mode runtime library is dynamically linked via DLL
The Box2D
code supports either setting. However, the Box2D project file has been setup for static linkage. AFAIK, you can't mix runtime libraries, so all your projects must use the same setting. Consistency is the key.
Another caveat: if you build with /MD, then your executable will look for some DLLs. Most likely your users won't have these DLLs, so you have to provide them with your distribution. I use /MT for all the projects in Box2D.sln so that I can distribute an executable file that doesn't require DLLs. The disadvantage is that the executable is larger and may take more memory.
Quote:
Anyhow, when I switch to /MT, I get various linker errors, and when I've removed them, I get this final and only message:
"box2d_d.lib(b2PairManager.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z)"
Hmm, box2d_d.lib is a debug build, so you need to use a debug runtime library (/MTd).