在编译VS时候,出现fatal error C1010: unexpected end of file while looking for precompiled head。

问题详细解释:致命错误C1010,在寻找预编译指示头文件时,文件未预期结束。就是没有找到预编译指示信息的头文件。

顾名思义就是预编译因为缺少了预编译文件而失败。解决方法显然可以取消预编译,或者帮助编译器找到预编译文件。

故解法:

1.右键单击项目工程中的cpp文件,在菜单Project->Settings->C/C++->Precompile Header,设置为第一项:Not using precompile headers。

2.在.cpp文件开头添加包含文件stdafx.h。 #include"stdafx.h"

已测试过OK

fatal error C1010: unexpected end of file while looking for precompiled header directive的更多相关文章

  1. fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?

    解决方法:设置cpp文件的Precompiled Header属性设置为Not Using Precompiled Headers

  2. 解决错误 fatal error C1010: unexpected end of file while looking for precompiled head

    在编译VS时候,出现fatal error C1010: unexpected end of file while looking for precompiled head. 问题详解:致命错误C10 ...

  3. 【Visual Studio】解决错误 fatal error C1010: unexpected end of file while looking for precompiled head(转)

    原文转自 http://blog.csdn.net/liuqiyao_01/article/details/38867145 在编译VS时候,出现fatal error C1010: unexpect ...

  4. 关于” fatal error C1010: unexpected end of file while looking forprecompiled header directive”问题

    其中文意思是:致命错误C1010:意想不到的文件结束而寻找预编译头文件的指令错误执行cl exe. 经过多次的查找,终于解决这问题 方法一: 在头文件中加“#include "stdafx. ...

  5. C1010 unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source

    提示说是预编译出现问题,提示添加头文件stdafx.h,但是添加了也会继续有其他错误解决方法: 在菜单Project->Properties(或者直接快捷键Alt+F7)->C/C++-& ...

  6. 使用VC6.0编译C++代码的时候报错:fatal error C1071: unexpected end of file found in comment(Mark ZZ)

    fatal error C1071: unexpected end of file found in comment(Mark ZZ) 今天在一论坛上看到一人发帖: 『最近遇到一个奇怪的问题,代码中的 ...

  7. fatal error RC1004: unexpected end of file found处理方法

    资源编译器错误 RC1004 错误消息 遇到意外的文件结束 此错误是由于文本文件的最后一行中缺少换行符和回车符而造成的.

  8. fatal error C1071: unexpected end of file found in comment

    1.错误 #include<iostream> using namespace std; int main() { ..... return 0; } //如果把注释放到这里了,那么提交就 ...

  9. unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source 解决办法

    Project -> Properties -> C/C++ -> Precompiled Headers -> Precompiled Header -> 选择Not ...

随机推荐

  1. oracle_存储过程_没有参数_根据配置自动创建申请单以及写日志事务回滚

    CREATE OR REPLACE PROCEDURE A_MEAS_MIINSP_PLAN_CREATEASvs_msg VARCHAR2(4000);p_PERIODTYPE number; -- ...

  2. 超全面的JavaWeb笔记day22<文件上传>

    文件上传概述 1 文件上传的作用 例如网络硬盘!就是用来上传下载文件的. 在智联招聘上填写一个完整的简历还需要上传照片呢. 2 文件上传对页面的要求 上传文件的要求比较多,需要记一下: 1. 必须使用 ...

  3. 超全面的JavaWeb笔记day10<Response&Request&路径&编码>

    1.Response 2.Request 3.路径 4.编码 请求响应流程图 response 1.response概述 response是Servlet.service方法的一个参数,类型为java ...

  4. MySQL性能优化(三)-- 索引

    一.什么是索引及索引的特点 索引是一种数据结构 索引的特点:查找速度快,排好序,数据结构 索引的数据结构类型有:BTREE索引和HASH索引,下面展示的是BTREE索引. BTREE:balance ...

  5. Python 处理输入输出

    sys.stdin.read() 用于接收标准输入,也就是让用户通过键盘进行输入sys.stdout.write() 用于打印标准输出,也就是把输入的数据输出到屏幕sys.stderr.write() ...

  6. CentOS6.5安装图形界面(Gnome)

    因为是以最小化安装的Linux,无法使用图形界面,从网上看到资料,我使用yum安装果然很简单 ----------------------------------------------------- ...

  7. 为什么说在js当中所有类的父类是Object类

    代码如下所示: function Parent(add,net,no,teacher) { this.add = add; this.net = net; this.no = no; this.tea ...

  8. 实现类似printf这样的函数

    来源:http://www.vimer.cn/2009/12/cc%E5%AE%9E%E7%8E%B0%E5%A4%9A%E5%8F%82%E6%95%B0%E5%87%BD%E6%95%B0%E7% ...

  9. 如何提高AJAX客户端响应速度

    AJAX的出现极大的改变了Web应用客户端的操作模式,它使的用户可以在全心工作时不必频繁的忍受那令人厌恶的页面刷新.理论上AJAX技术在很大的程度上可以减少用户操作的等待时间,同时节约网络上的数据流量 ...

  10. Android英文文档翻译系列(3)——AsyncTask

      AsyncTask——异步任务   个人认为这是翻译比较好的一次.. Class Overview//类概述 AsyncTask enables proper and easy use of th ...