skipped when looking for precompiled header

一般出现:warning C4627: ‘#include "../stdafx.h"‘: skipped when looking for precompiled header

这个错误时,只需在源文件开头加上 #include "stdafx.h"即可。

但有时候,源文件是放在与stdafx.h不同目录下的,直接按以上做法是不可行的。需要将stdafx.h的路径包含进项目工程里,在按上面的做法即可。

将stdafx.h所在路径添加进项目工程的方法如下:

add "$(ProjectDir)" (or wherever the stdafx.h is) to the list of directories under:

Project->Properties->Configuration Propertes->C/C++->General->Additional Include Directories.

时间: 2024-10-10 09:55:04

skipped when looking for precompiled header的相关文章

如何解决…has been modified since the precompiled header… was built的问题

如何解决-has been modified since the precompiled header- was built 的问题 xcode5.1在程序中报错: File '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks/UIKit.framework/Hea

has been modified since the precompiled header

Clean工程 按住option键,再次Clean(Clean Build Folder...) 进入Window -> Organizer,在上面的Tab中选择Project,在左侧选中当前的工程,在右侧把Derived Data删除 报has been modified since the precompiled header错误的时候会显示很长的错误信息,其中有个包含DerivedData目录的路径,把路径指向的文件删掉 关闭Xcode,直接把 /Library/Developer/Xco

iOS 协同开发出fatal error: file ‘XX-Prefix.pch’ has been modified since the precompiled header was built

在协同开发的时候,刚刚从svn下载到本地的代码,出现“fatal error: file 'XX-Prefix.pch' has been modified since the precompiled header was built”的问题,这个其实不是什么问题,解决方案如下: 1.找到  XX-Prefix.pch 文件  注释掉下面的代码: #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <CoreData/CoreData.h>

fatal error C1853: &#39;Debug/***.pch&#39; is not a precompiled header file created with this compiler

出现这个问题,把工程编译选项中的预编译去掉就可以了,操作步骤:首先全部重编译一下工程,如还是不行则试一试将工程设置中C/C++中precompiled   header中选中automatic   use   of   precompiled   headers,并在相应through   header中输入stdafx.h. 另外,rebuild all也是一种方法,或把debug目录下的文件删除,然后重新编译. fatal error C1853: 'Debug/***.pch' is no

解决 xx.h has been modified since the precompiled header 系统头文件被修改

fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h' has been modified since the precompiled header '/Users/

xcode 编译错误 note: please rebuild precompiled header &#39;/Users/wdl/Library/Developer/Xcode/DerivedData/ModuleCache/97F16MVNSP3M/UIKit-35TDUEIBFI6H.pcm&#39;

在真机调试时遇到 atal error: file '/Applications/Xcode6.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIWebView.h' has been modified since the precompiled hea

fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add &#39;#include &quot;stdafx.h&quot;&#39; 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

添加头文件的报错failed to emit precompiled header 的解决办法

在buildsetting中的以下两个路径中添加对应的设置,重现编译即可解决,stackoverflow地址:点击 Solution:1 I added $(inherited) non-recursive to Search Path -> Header Search Paths2 Then added ${PODS_ROOT} recursive to Search Path -> User Header Search PathsBoth the above in my projects'

iOS遇到的问题:OC与swift混编造成的 Failed to emit precompiled header

当我接手一个OC与swift混编的项目的时候,其实我是拒绝的.哎,没有办法啊,只能干啦. pod完以后有很多问题,最难的问题就是这个了, 其实是由于他Podfile文件里面有use_frameworks!这样一句话,首先,我们先说一下他的作用. A.用cocoapods 导入swift 框架 到 swift项目和OC项目都必须要 use_frameworks!B.使用 dynamic frameworks,必须要在Podfile文件中添加 use_frameworks! use_framewor