C/C++/VC编程高手请进......感激不尽

fatalerrorC1010:unexpectedendoffilewhilelookingforprecompiledheaderdirectiveGeneratin... fatal error C1010: unexpected end of file while looking for precompiled header directive Generating Code...Error executing cl.exe.
编译时候出现了一个致命错误:请帮帮忙!谢谢!
展开
 我来答
百度网友914696642
2007-04-21 · TA获得超过779个赞
知道小有建树答主
回答量:332
采纳率:0%
帮助的人:0
展开全部
这种问题往往是因为简单的语法错误引起的,仔细检查一下代码,是否有少";"或语法不完整的地方或少"}".
如果不是上面的错误,那么加一个#include <stdafx.h>再看看
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
意法半导体(中国)投资有限公司
2023-06-12 广告
单片机,即单片微控制器,也称为单片微型计算机,是将中央处理器(CPU)、存储器(ROM,RAM)、输入/输出接口和其他功能部件集成在一块 在一个小块的集成电路上,从而实现对整个电路或系统的数字式控制。单片机不是完成某一个逻辑功能的芯片,而是... 点击进入详情页
本回答由意法半导体(中国)投资有限公司提供
chenhaooo
2007-04-20 · TA获得超过439个赞
知道小有建树答主
回答量:487
采纳率:0%
帮助的人:266万
展开全部
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)

参考资料: MSDN

本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式