在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)没通过!!!

解决方案 »

  1.   

    xp 对其他硬件要求都很高,所以换一种试一下吧 VC6.0与XP很有可能不兼容
      

  2.   

    没有啊,都是默认安装的,不过我用的安装盘是 visual studio 6.0 中的
    visual C++ 6.0 安装盘安装的。
    另:Visual Studio.NET 7.0 是不是经常所讲的 VC 7.0
      

  3.   

    刚学VC ,总觉得VC的debug工具比不上borland 的好用
    错误提示也不详细,对于一个刚从BCB或TC转学VC的初学者来说,很不方便比如,我刚编一个 "hello" 程序,它的错误提示,看不懂!!!
      

  4.   

    呵呵,我刚从VC转到BCB,觉得BCB的DEBUG好烂,出错时只给寄存器和内存我看,可我想知道错在源码的哪一行。真他妈不适应。另:我调试时用的是DEBUG模式.
      

  5.   

    能不能把 包含的*.h报上来,还有hello 程序是不是就在客户区上打一个
    “hello world" 之类的东西?
    还是把关键代码贴上来吧。可能是:1.头文件中有过期的.
            2.仅仅是代码的错误,(不是语法错误)劝告:不要粗暴的调用看似功能成立的函数;
          在下就有用_printf函数来企图生成一个Message Box. 汗!
      

  6.   

    我也是用同样向导的方式做了一个hello程序,没有做任何修改, 编译也出了同样的错误,用的也是这个版本的vc6,不过是在win2000 server下安装的;可见应该与系统没有关系;这个版本是创天中文简体vc++6,哪位仁兄有用过此版本的vc++做同样的东西 没有出错?
      

  7.   

    我根据提示"D:\myproject\hello.cpp(45)"将hello.cpp的第45行"CHelloApp theApp;"注解掉则可以编译通过,但无法运行. 
    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
      

  8.   

    我昨天学校机房也出了同样的错。在win2000下,用的是创天中文版,我觉得是安装的错,但不知道怎么解决(在不重装的情况下)。