hi, i'm trying to learn using MFC and the first example i tried out didn't compile on visual c++ 2005. here it is:
i created a win32 empty project and added one source file with the following:
---
#include
class CMyApp : CWinApp
{
public:
virtual BOOL InitInstance();
};
class CMyWindow : CFrameWnd
{
public:
CMyWindow()
{
Create(0, L"My first app, ehi2");
}
};
BOOL CMyApp::InitInstance()
{
m_pMainWindow = new CMyWindow;
m_pMainWindow->ShowWindow(m_nCmdShow);
return TRUE;
}
CMyApp App;
-------
when i compile it says:
"Error 1 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:\program files\microsoft visual studio 8\vc\atlmfc\include\afx.h 24 "
what should i do?
2007-05-22
08:06:01
·
4 answers
·
asked by
Amr Hassan
2
in
Computers & Internet
➔ Programming & Design
i've been writing c++ for a couple of weeks now, and i thought i'd start with learning how to GUI using MFC today and it's been terrible :(
i already found that link when i googled it earlier and it didn't help, just as it didn't help the person who asked it.
and i'm using microsoft visual studio, not the experess.
2007-05-22
08:28:19 ·
update #1