在windows xp 环境下,使用VC6.0的 MFC Appwizard(exe)方式编一个 hello 程序,就出错,help!!! 是VC 与 winxp 不兼容?还是别的什么原因??
以下是编译的过程!!!Deleting intermediate files and output files for project 'hello - Win32 Debug'.
-------------------Configuration: hello - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
hello.cpp
D:\myproject\hello.cpp(45) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
MainFrm.cpp
helloDoc.cpp
helloView.cpp
Generating Code...
Error executing cl.exe.hello.exe - 1 error(s), 0 warning(s)没通过!!!
以下是编译的过程!!!Deleting intermediate files and output files for project 'hello - Win32 Debug'.
-------------------Configuration: hello - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
hello.cpp
D:\myproject\hello.cpp(45) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
MainFrm.cpp
helloDoc.cpp
helloView.cpp
Generating Code...
Error executing cl.exe.hello.exe - 1 error(s), 0 warning(s)没通过!!!
解决方案 »
- 怎么限制(检测)一下字符串只能有简体中文?
- vc 文件更新时间问题
- ATL初学者!问题
- 全局钩子如何退出?
- 关于CryptProtectData()和CryptUnProtectData()的问题,急!!
- VC新手求助,我相做一个类拟Windows资源管理器的程序,只是listView变成其它的?
- 小女子高分求救!!!!!^-^
- 需安装软件和无需安装软件的讨论!
- 实时改变菜单项的名字的问题
- RegSetValueEx修改注册表怎么将一个网卡绑定多个地址【XPE系统】
- 希望高手能参加讨论,用CFile打开文件,GetLength()然后根据文件长度,将文件内容全部用0填充,重新写回文件中,关闭文件
- 如何用OLE DB存取大对象(BLOB)啊!
visual C++ 6.0 安装盘安装的。
另:Visual Studio.NET 7.0 是不是经常所讲的 VC 7.0
错误提示也不详细,对于一个刚从BCB或TC转学VC的初学者来说,很不方便比如,我刚编一个 "hello" 程序,它的错误提示,看不懂!!!
“hello world" 之类的东西?
还是把关键代码贴上来吧。可能是:1.头文件中有过期的.
2.仅仅是代码的错误,(不是语法错误)劝告:不要粗暴的调用看似功能成立的函数;
在下就有用_printf函数来企图生成一个Message Box. 汗!
hello.cpp程序如下:
// hello.cpp : Defines the class behaviors for the application.
//#include "stdafx.h"
#include "hello.h"#include "MainFrm.h"
#include "helloDoc.h"
#include "helloView.h"#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif/////////////////////////////////////////////////////////////////////////////
// CHelloAppBEGIN_MESSAGE_MAP(CHelloApp, CWinApp)
//{{AFX_MSG_MAP(CHelloApp)
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////
// CHelloApp constructionCHelloApp::CHelloApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}/////////////////////////////////////////////////////////////////////////////
// The one and only CHelloApp objectCHelloApp theApp;/////////////////////////////////////////////////////////////////////////////
// CHelloApp initializationBOOL CHelloApp::InitInstance()
{
AfxEnableControlContainer(); // Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif // Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T("Local AppWizard-Generated Applications")); LoadStdProfileSettings(); // Load standard INI file options (including MRU) // Register the application's document templates. Document templates
// serve as the connection between documents, frame windows and views. CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CHelloDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CHelloView));
AddDocTemplate(pDocTemplate); // Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo); // Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE; // The one and only window has been initialized, so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow(); return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App Aboutclass CAboutDlg : public CDialog
{
public:
CAboutDlg();// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA // ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
// No message handlers
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()// App command to run the dialog
void CHelloApp::OnAppAbout()
{
CAboutDlg aboutDlg;
aboutDlg.DoModal();
}/////////////////////////////////////////////////////////////////////////////
// CHelloApp message handlers