The general method found on the Internet is to change “property page – & gt; configuration property – & gt; C/C + + – & gt; code generation – & gt; runtime” from “multi thread (/ MT)” to “multi thread DLL (/ MD)”.
MT is a static compilation option, while MD is a dynamic compilation option. What if you want to compile statically?
In fact, while setting “runtime” to MT, you can change “property page – & gt; configuration property – & gt; general – & gt; use of MFC” to “use MFC in static library”
.
IntelliSense: error instruction: please use the/MD switch for_ Afxdll builds – Solutions – ordinarydilligent – Zhang Sir’s blog
IntelliSense: error instruction: please use the/MD switch for_ Afxdll builds – Solutions – ordinarydilligent – Zhang Sir’s blog
Similarly, if you want to compile dynamically, for:
error 1, error C1189: # error: building MFC application with/MD [D] (CRT DLL version) requires MFC shared DLL version. Please define_ AFXDLL or do not use /MD[d]
You need to set “property page – & gt; configuration property – & gt; general – & gt; use of MFC” to “use MFC in shared DLL”, and set “property page – & gt; configuration property – & gt; C/C + + – & gt; code generation – & gt; runtime” to “multithreaded DLL (/ MD)”
Supplement: (/ MD) and (/ MT) are used to compile release version, (/ MDD) and (/ MTD) are used to compile debug version
Read More:
- The Vue project cannot use a component name that contains the word switch
- Solutions to error c2143: syntax error: missing ‘;’ before ‘type’ in C + + program compilation
- Error c2371: ‘xxx’: redefinition; different basic types solutions
- Oracle 12C installation process related errors and Solutions
- Python switch / case statement implementation method
- Windows update error 8024401c – one of the solutions
- Implementation of Python switch / case statements
- Solutions to the problem of “collect2.exe: error: LD returned 1” exit “status when writing C + + with vscode
- Nanny level solutions use the enterprise version of MyEclipse to show the MyEclipse trial expired solution and activation
- On the problem of NAC signature error when switch installs the game
- [Solved] Unity Error: Deterministic compilation failed. You can disable Deterministic builds in Player Settings
- Java encrypts the string with MD5
- Method of generating MD5 file checksums under Windows
- [Unity] Deterministic compilation failed. You can disable Deterministic builds in Player Settings Li
- How to use C + + function pointer array
- C language string processing error warning, c4996, sprintf, predicted, c4996, strcpy, c4996, strcat
- Docker builds the pit that Seata stepped on. can not connect to services-server
- Viewing MD5 value of file under Windows
- C++ cin.ignore Use of ()
- Use of C + + ifstream and error handling