问题
What is difference betwwen /MD and /MDD( multi threaded debug dll ) in c/c++->code generation
propertis of visual studio ....
回答1:
They specify which runtime to use. Both use mmulti-threaded dynamic (DLL) runtimes, but the /MDD version uses the debug version and also defines the _DEBUG symbol for you. See this MSDN page for details.
回答2:
The debug version (MDD) allows you to step into the C and C++ libraries, during debugging. There are additional checks for incorrect heap operations and memory leaks. Having dependencies (eg. DLL) to both the release and debug versions can lead to problems so it is recommended that you stick to /MDD for debug version and /MD for release versions.
For Visual Studio 2005/2008, if your application uses /MDD, but depends on DLLs that are built with the release libraries, you will also need to include the manifest for the release libraries in your project settings.
回答3:
Programs linked with the /MDd probably won't run on most user machines, since the debug versions of the standard libraries are unlikely to be installed on them.
回答4:
If you compile with /MDd in VS 2012 you get the following dependency: MSVCP110D.dll.
The Visual C++ Redistributable Package installation will not provide this DLL. So if you want to distribute the executable, the target machine has to have installed Visual Studio.
Compiling with /MD, on the other hand, will give a dependency on MSVCP110.dll, which is installed with the VS Redistributable Package.
Correct me if I'm wrong..
来源:https://stackoverflow.com/questions/924830/what-is-difference-btw-md-and-mdd-in-visualstudio-c