Multithreaded DLL (/ MD) and multithreaded (/ MT)
There are four projects in my VC ++ MFC solution.
- Two projects are built as DLL
- One project is built as static Lib
- One project is built as exe using three libraries.
I need to host this application without CLR support on Windows XP. so I use the config Use of MFC
as Use MFC in a Static Library
in all four projects.
So my question is what should be the configuration C++-> Code Genaration
for each project.
source to share
Use / MD for all your projects. As stated in the questions mentioned: it's important to be consistent. So: even create your static Lib with / MD, as it will be used in the / MD executable. When you do this, the linker does not try to link two different versions of the Microsoft library (static and dynamic), which resolves the error.
source to share