问题:
在c++/cli控制台项目中,因为要使用cstdiofile类,所有包含了afx.h,但是报如下错误:
“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]”
解决办法:
在stdafx.h文件里添加如下代码行:
#define _AFXDLL