夏未眠 发表于 2014-8-6 09:54:38

vc写最简单的windows图形界面程序提示出错,No such file or directory执行

// text123.cpp : Defines the entry point for the application.
//

#include "stdafx.h"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR   lpCmdLine,
                     int       nCmdShow)
{
        // TODO: Place code here.
    MessageBox(NULL,TEXT("hello"),TEXT("hi"),MB_OK);
        return 0;
}
上边是源程序




fatal error C1083: Cannot open precompiled header file: 'Debug/text123.pch': No such file or directory
执行 cl.exe 时出错.

text123.obj - 1 error(s), 0 warning(s)

这个是提示的错误,求解释
另外本人系统为w8.1,但已成功解决兼容性问题

oggplay 发表于 2014-8-6 10:20:33

头文件路径不对,

计机羊咩咩 发表于 2014-8-6 11:03:49

#include<windows.h>才是正确的头文件

沉默默 发表于 2014-8-6 12:33:11

# include <windows.h>
页: [1]
查看完整版本: vc写最简单的windows图形界面程序提示出错,No such file or directory执行