精选问答
fatal error C1189:#error :Building MFC application with /MD[d] (CRT dll ve#include CMyApp theApp;class CMyApp :public CWinApp{};class CMyWnd :public CFrameWnd{public:\x05CMyWnd()\x05{\x05\x05Create(0,L"MFC应用程序");\x05}};BOOL CMyApp::InitInstance(){\x05mpMa

2019-05-28

fatal error C1189:#error :Building MFC application with /MD[d] (CRT dll ve
#include
CMyApp theApp;
class CMyApp :public CWinApp
{
};
class CMyWnd :public CFrameWnd
{
public:
\x05CMyWnd()
\x05{
\x05\x05Create(0,L"MFC应用程序");
\x05}
};
BOOL CMyApp::InitInstance()
{
\x05m_pMainWnd=new CMyWnd();
\x05m_pMainWnd->ShowWindow(m_nCmdShow);
\x05return CWinApp::InitInstance();
}
编译后:
1>------ 已启动生成:项目:手动MFC,配置:Debug Win32 ------
1>正在编译...
1>main.cpp
1>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]
1>生成日志保存在“file://d:\编程\Windows 应用程序\VC++\2008\VC++2008完全学习手册\第十三章\手动MFC\手动MFC\Debug\BuildLog.htm”
1>手动MFC - 1 个错误,0 个警告
全工程就这一个源文件
优质解答
试一下 工程-设置-常规-然后选“使用mFC作为共享的DLL” 试一下 工程-设置-常规-然后选“使用mFC作为共享的DLL”
相关问答