今天写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" ,添加该包含即可。