Compiler Switches /MD and MT
-
What is the difference in terms of code generation with these two switches? I understand one if for DLL code and one for Multithread code, but it seems that this means I need to generate four static library versions with each library (six if I include single threaded), since I need a release and debug version. Are people really generating six versions of each static library or am I just missing something important?
-
What is the difference in terms of code generation with these two switches? I understand one if for DLL code and one for Multithread code, but it seems that this means I need to generate four static library versions with each library (six if I include single threaded), since I need a release and debug version. Are people really generating six versions of each static library or am I just missing something important?
When you specify /MD the compiler will link MSVCRT.LIB(MSVCRT.dll/MSVCR71.dll must be available at runtime) to your object code. If you use /MT the compiler will link the static version of C runtime (LIBCMT.lib) to your application. There is no need for you to generate four static library versions. You can choose either of these two. Multi-threaded runtime DLL Version(/MD) - Or Multi-threaded runtime LIB version(/MT). Cheers -- modified at 6:03 Thursday 12th April, 2007