c++MFC工程修改在共享DLL中使用MFC为使用标准Windows库的解决办法时间:2024-04-23 17:54:06由于创建MFC工程时,默认是在共享DLL中使用MFC,如果将此选项改成使用标准Windows库,会报如下错误 c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afx.h(24) : fatal 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] 此时可以做如下更改解决: 工程->属性- >配置属性->c++->命令行结尾加上/D "_AFXDLL"