fatal error C1083: Cannot open precompiled header file: 'Debug/xxoo.pch': No such file or directory
相信很多童鞋都遇到过这种问题,找不到pch文件,看这个描述肯定是与预编译头有问关系。(预编译头有神马作用就不说了,可以自己了解下)。一般遇到上面的问题很有可能是拷贝工程的时候,把stdafx.h stdafx.cpp文件删除了,而此时你即使把这两个文件再加入工程还是会报上面的错误。要重现这个错误也很简单,按上面的说法,新建一个标准工程,然后把stdafx.h stdafx.cpp文件删除,再编译肯定会报这个错误的。
这个错误的根源在于,编译器发现有源文件(CPP,C……)带有/Yu编译选项,但是找不到一个源文件带有/Yc选项,解决方法也就很明显了,至少有两个:
1、把所有源文件都设置为不使用预编译头,如果文件少还好说,如果多而且还在不同的Filter里面的话,那就坑爹了。
2、随意设定一个源文件为创建预编译头属性。当然最好还是加入 stdafx.cpp文件,并对其进行设置。注意到设置Precompiled Headers右边的第二行,Create/User PCH Through File,在这里指定创建预编译头针对的头文件。正常情况下(如果你没改动)应该是StdAfx.h文件,如果你另外指定了一个文件,那么需要在所有的源文件的最前面包含这个头文件,你懂的。如果你不怎么做,会报一个更“恐怖”的错误,fatal error C1010: unexpected end of file while looking for precompiled header。简直比坑爹还坑爹。相信这个错误遇到的人就更多了……
对于/Yc选项可以去看下MSDN上的描述<http://msdn.microsoft.com/en-us/library/7zc28563.aspx >,相信应该就比较清楚了。
转自:
http://blog.csdn.net/magictong/article/details/6398135
http://msdn.microsoft.com/zh-cn/library/ee461145.aspx
分享到:
相关推荐
网友分享的能够解决fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory问题的程序。MySQL-python-1.2.3.win32-py2.7.exe-32位MySQL-python-1.2.3.win-amd64-py...
fatal error C1083: 无法打开包括文件:“stdint.h”: No such file or directory 【错误】fatal error C1083: 无法打开包括文件:“stdint.h”: No such file or directory 【原因】stdint.h是c99标准的头文件,vc不...
fatal error C1083: Cannot open include file: 'io.h': No such file or directory
18年7月更新,清华镜像,完美解决 Yocto,Android fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle 错误,绕开GFW
fatal error C1083: 无法打开包括文件:“stdint.h”: No such file or directory. stdint.h是c99标准的头文件,vc不支持,所以肯定会提示“No such file or directory”的。使用方法:下载压缩包,解压得到两个.h...
fatal:remote error: You can't push to git://github.com/username/*.git Use git@github.com:username/*.git 看来我是没有权限push啊。 解决方法: git remote rm origin git remote add origin git@github....
下载该文件后,分别将glaux.h、glaux.dll、glaux.lib拷贝到VS2013的安装目录即:VS2013/VC/lib ; VS2013/VC/bin ; VS2013/VC/include/GL中,重新编译即可。
问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...
_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27 希望软件对您...
error C1083: 无法打开包括文件:“pthread.h”: No such file or directory cocos2d-x-2.1.5\extensions\AssetsManager\AssetsManager.h 30 1 AssetsManagerTest
在VS2008中,经常会遇到“fatal error C1083: 无法打开包括文件:“afxcontrolbars.h””这样的问题,该文档提供了一个解决方案。
Python安装MySQL文件,EXE文件 ..._mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 原来还是驱动问题,不管mysql的事。 希望该安装包对你有所帮助~
torch 项目完整代码,公司无法使用git,所以放了个备份在csdn上 (git clone https://github.com/torch/distro.git ~/torch --recursive)
LINK : fatal error LNK1104: cannot open file "mfc42u.lib"-附件资源
下面是编译出错的提示"fatal error C1083: Cannot open precompiled header file: 'Debug/test.pch': No such file or directory ",如果您遇到过类似的困难,可以参考本文。
前言本博客所写到的是我在Linux云服务器升级编译内核时所遇到的真实问题,已解决。编译内核遇到的问题太多了。问题描述 在进行内核编译的时候,提sha1加密 C语
fatal error: zmq.hpp: No such file or directory compilation terminated. 找不到zmq.hpp的原因是, zmq.hpp只存在master中。 如果你使用release版本,那么是没有zmq.hpp这个文件的。去master中找到zmq.hpp。 将...
Error while executing: npm ERR! /usr/bin/git ls-remote -h -t https://github.com/nhn/raphael.git npm ERR! npm ERR! fatal: unable to access 'https://github.com/nhn/raphael.git/': Failed connect to ...
fatal error C1083: 无法打开包括文件:“inttypes.h”: No such file or direct