fatal error C1010: unexpected end of file while looking for precompiled header d

love1314_2004 2010-07-22 05:10:53
fatal error C1010: unexpected end of file while looking for precompiled header directive
错误原因是什么?
...全文
859 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Eleven 2010-07-23
  • 打赏
  • 举报
回复
#include "stdafx.h "
Rebuild All一下
CloudmmFly 2010-07-23
  • 打赏
  • 举报
回复
使用的什么工具,有没有设置使用预编译头?
Yanger_xy 2010-07-23
  • 打赏
  • 举报
回复
在所有的.cpp文件前面加上 #include "StdAfx.h"
hellboy198502 2010-07-22
  • 打赏
  • 举报
回复
http://blog.csdn.net/ziren235/archive/2006/12/04/1428869.aspx
用户 昵称 2010-07-22
  • 打赏
  • 举报
回复
#include "StdAfx.h"?
lazy_2010 2010-07-22
  • 打赏
  • 举报
回复
缺省情况下,Visual studio 中的 .cpp 文件的第一行一般应当是 #include "stdafx.h";如果你不是新手,另外谈。
踏实每一步 2010-07-22
  • 打赏
  • 举报
回复
Error Message
unexpected end of file while looking for precompiled header. Did you forget to add '#include name' to your source?


An include file specified with /Yu is not listed in the source file. This option is enabled by default in most Visual C++ Project types and "stdafx.h" is the default include file specified by this option.

In the Visual Studio environment, use one of the following methods to resolve this error:

If you do not use precompiled headers in your project, set the Create/Use Precompiled Header property of source files to Not Using Precompiled Headers. To set this compiler option, follow these steps:

In the Solution Explorer pane of the project, right-click the project name, and then click Properties.

In the left pane, click the C/C++ folder.

Click the Precompiled Headers node.

In the right pane, click Create/Use Precompiled Header, and then click Not Using Precompiled Headers.

Make sure you have not inadvertently deleted, renamed or removed header file (by default, stdafx.h) from the current project. This file also needs to be included before any other code in your source files using #include "stdafx.h". (This header file is specified as Create/Use PCH Through File project property)

hzy694358 2010-07-22
  • 打赏
  • 举报
回复
有加
#include "StdAfx.h"?

16,548

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • AIGC Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧