error
The following error occurred while compiling the file with vs:
#error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _ AFXDLL or do not use /MD[d]
Checked on the Internet, most of the solutions ignore some details, so they may not solve the problem. Here are some details
solutions
1. Select “solution manager” first, and then change “multi thread debugging DLL (/ MDD)” to “multi thread debugging DLL (/ MT)” or “multi thread debugging (/ MTD)” according to the following path: Project – properties – C/C + + – code generation – runtime
2. Select “solution manager”, and then follow the following path: Project – properties – configuration properties – General – Project default – use of MFC, and select “use MFC in shared DLL” (sometimes it does not need to be modified)
3. From the error prompt: “please define”_ Afxdll or do not use/MD [D] “, we can also define” define “_ Afxdll “to solve the problem
precautions
1. Note that selecting “property manager” and “Solution Explorer” will get different property pages. The former is to modify the properties of the whole vs system, while the latter only affects the current project
2. What is provided here are only three points that should be modified to solve this error. If the above solution is completely followed, sometimes it can not solve the problem. The correct idea is to randomly combine the options mentioned in the first two methods and recompile them to try to find out if there is any error. This is the easiest way. After all, everyone is configured in a different environment
Similar Posts:
- Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException
- How to Solve “The import javax.servlet cannot be resolved” Error
- Error LNK2019: unresolved external symbol WinMain (vs2019)
- SDK location not found. Define location with sdk.dir in the local.properties file or with an AND…
- Cannot find bounds of current function
- [Solved] Run-Time Check Failure #2 – Stack around the variable ‘a’ was corrupted
- The solution of the import javax.servlet cannot be resolved in Java
- The solution of “the windows SDK version for 8.1 was not found” in vs2017 C + + compilation
- Building for production… ERROR TypeError: Cannot read property ‘createHash‘ of undefined
- [transfer] could not resolve placeholder solution