您的位置:首页 > 编程语言 > C语言/C++

VC++6.0 unexpected end of file while looking for precompiled header directive

2016-03-27 14:53 309 查看
    今天写MFC程序,在使用VC++6.0编译程序的时候,编译器提示出错,错误提示为“ e:\windows\windows.cpp(87) : fatal error C1010: unexpected end of file while looking for precompiled header directive”

上网一查,原来是没有加头文件,#include "stdafx.h"  ,加上以后,程序瞬间便可以通过编译了。

    错误:fatal error C1010: unexpected end of file while looking for precompiled header directive
    分析:工程头文件处理的错误。

    解决:

              1、右键点工程名,选设置,然后选c/c++属性页,再选catagory选单中选 precompiled header ,将选项置成no use 或者autometic

              2、如果使用的是Win32工程,可能就是错误文件没有包含:#include "stdafx.h"  ,添加该包含即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: