Reputation: 519
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?
Upvotes: 32
Views: 45665
Reputation: 3230
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)
Upvotes: 50
Reputation: 160
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.
Upvotes: 10