Building MFC application with MDd CRT dll version requires MFC shared dll version Please #define _AFXDLL or do not use MDd
The error message is suggesting that when building an MFC (Microsoft Foundation Classes) application with the /MD[d] flag, which specifies the CRT (C Runtime) DLL version to use, you also need to use the MFC shared DLL version.
To resolve this issue, you have two options:
-
Define _AFXDLL: In your project settings, go to the C/C++ -> Preprocessor section and add _AFXDLL to the list of preprocessor definitions. This will enable the MFC shared DLL version.
-
Do not use /MD[d]: If you do not want to use the MFC shared DLL version, you can remove the /MD[d] flag from your project settings. This will link the CRT statically into your application, eliminating the need for the MFC shared DLL version.
Choose the option that best suits your requirements and make the necessary changes in your project settings.
原文地址: https://www.cveoy.top/t/topic/hP1N 著作权归作者所有。请勿转载和采集!