what is difference btw /MD and /MDD in VisualStudio C++?

自作多情 提交于 2021-01-27 04:54:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!