I encountered an error in Visual Studio, Please use the /MD switch for _AFXDLL builds
so if I undefine the _AFXDLL
, will my program go wrong?
Settings for CRT linking and MFC linking must be coherent. So, actually, there are two possible answers at this question:
Use /MT (Properties -> C/C++ -> Code Generation) and static MFC (Properties -> General -> Use of MFC)
Use /MD (Properties -> C/C++ -> Code Generation) and shared MFC (Properties -> General -> Use of MFC)
Yes it will. What you should do is is go to your Visual Studio project properties. In Configuration Properties -> C/C++ -> Code Generation make sure you are using the Multi-threaded Dll for your Runtime Library.
That will solve your problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With