【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: 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"

时间: 2024-08-05 15:21:05

【Visual Studio】解决错误 fatal error C1010: unexpected end of file while looking for precompiled head(转)的相关文章

解决错误 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. 问题详解:致命错误C1010,在寻找预编译指示头文件时,文件未预期结束.就是没有找到预编译指示信息的问文件. 顾名思义就是预编译由于缺少了预编译文件而失败.解决方法显然能够取消预编译,或者帮助编译器找到预编译文件. 故解法: 1.右键单击项目project中的cpp文件,在菜单Project->Settings->C/C

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 fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? 原文地址:https://www.cnblogs.com/MakeView66

fatal error C1071: unexpected end of file found in comment

1.错误 #include<iostream> using namespace std; int main() { ..... return 0; } //如果把注释放到这里了,那么提交就会出错 2.正确 #include<iostream> using namespace std; int main() { ..... //应该放到大括号里面 return 0; } fatal error C1071: unexpected end of file found in commen

mysql-python 安装错误 fatal error C1083: Cannot open include file: &#39;config-win.h&#39;: No such file or directory

安装mysql-python之前, 请先安装setuptools. https://pypi.python.org/pypi/setuptools/7.0 下载mysql-python. 下载源码包. https://pypi.python.org/pypi/MySQL-python/1.2.5 解压后执行 python setup.py install 提示错误: fatal error C1083: Cannot open include file: 'config-win.h': No s

编译Busybox时,出现错误fatal error: curses.h: No such file or directory

1 scripts/kconfig/mconf.c: In function ‘exec_conf’: 2 scripts/kconfig/mconf.c:481:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result] 3 pipe(pipefd); 4 ^ 5 SHIPPED scripts/kconfig/zconf.tab.c 6 SH

(ubuntu) pip install scandir 时出现错误 fatal error: Python.h: No such file or directory

安装 jupyter时遇到这个问题,在这里查到了解决方法,特记录一下. 解决方式为: 先安装 python-dev: $ sudo apt-get install python-dev 然后再安装需要的包: pip install scandir

(诊断)处理错误fatal error: Python.h: No such file or directory

安装与Python版本对应的 python-dev 即可,比如: $ sudo apt-get install python2.7-dev

“fatal error C1010”错误解决的三种方法

尝试写了一个简单的类文件,但在编译的时候提示错误,具体错误信息如下: fatal error C1010: unexpected end of file while looking for precompiled header directive 从网上搜到了一些解决办法,具体办法如下 : 1.在类的实现cpp文件的头部第一行加上“#include "stdafx.h"”. 2.关闭预编译头文件选项.具体步骤如下: Project Settings(Alt+F7) -> C/C+

错误描述:fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include &quot;stdafx.h&quot;”?(转)

错误分析: 此错误发生的原因是编译器在寻找预编译指示头文件(默认#include "stdafx.h")时,文件未预期结束.没有找到预编译指示信息的头文件"stdafx.h".    (因为工程中的每个cpp文件属性默认都是使用预编译头(/YU)的(选择了使用,就要在源文件中显式写上#include),但是添加的第三方文件并没有 #include "stdafx.h" 预编译指示头,所以编译器在此cpp文件中一直到末尾都没有找到它)    我的这