#error Please use the /MD switch for _AFXDLL builds
- #error Please use the /MD switch for _AFXDLL builds
- 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)
- error Please use the /MD switch for _AFXDLL builds
- C++ Code Generation set to /MT, press Apply and then set it back to /MD (see above)
- Close and reopen the Solution
- Close and restart Visual Studio
- Remove the Project from the Solution and add it back as existing project
- Error C1189: #error: Please use the /MD switch for _AFXDLL builds(转)
This is a paragraph.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?
A Solution: Settings for CRT linking and MFC linking must be coherent. So, actually, there are two possible answers at this question:
Yes it will. What you should do is is go to your Visual Studio project properties:
That will solve your problems.
I have following error
A Solution: I don't think that code block should be used, it will do more harm than good
I agree, the build system for Visual C++ application is horrendous, the error messages are indecipherable and I have probably spent more time debugging this side of things than anything else, however, this I believe is the problem and the solution.
In your project properties, Go to
Clear as mud eh?
I've encountered the same error in a number of different Win32 DLL projects, all of which had /MD switch applied.
I reported the problem in July 2011 and Microsoft confirmed there was a bug, but promised to fix it in the next major release.
A Solution: Since submitting this bug report, I've come to realise that it's nothing to do with MFC static libraries. There's just something wrongwith Intellisense. Seemingly, there isn't an easy fix. Trying the following sometimes makes this the erroneous 'error' go away:
Side Note: Thanks for your advice! That helped and additionally I removed solution's suo file before restarting VS2010.
A Side Note: Also - check that you are consistent with Release and Debug builds. The configuration properties may be different.
+1 for "Intellisense problem" My (personal) solution: Restart VS 2010 with admin rights...
a collection of ideas works.
No comments:
Post a Comment