Iphone iOS编译器错误:找不到IOKit/IOKitLib.h
我只是试着为iPhone编译我的xcode项目(使用Phonegap) 编译失败,但出现以下消息:Iphone iOS编译器错误:找不到IOKit/IOKitLib.h,iphone,ios,frameworks,build,Iphone,Ios,Frameworks,Build,我只是试着为iPhone编译我的xcode项目(使用Phonegap) 编译失败,但出现以下消息: In file included from /Users /mobile /Documents /dev /mobile /ios /TOMO /xcode /TOMO /MyProject.de-Prefix.pch:25 (#import <UIKit/UIKit.h>): In file
In file included from
/Users
/mobile
/Documents
/dev
/mobile
/ios
/TOMO
/xcode
/TOMO
/MyProject.de-Prefix.pch:25
(#import <UIKit/UIKit.h>):
In file included from
/Applications
/Xcode.app
/Contents
/Developer
/Platforms
/iPhoneOS.platform
/Developer
/SDKs
/iPhoneOS6.1.sdk
/System
/Library
/Frameworks
/UIKit.framework
/Headers
/UIKit.h:10
(#import <UIKit/UIAccessibility.h>):
In file included from
/Applications
/Xcode.app
/Contents
/Developer
/Platforms
/iPhoneOS.platform
/Developer
/SDKs
/iPhoneOS6.1.sdk
/System
/Library
/Frameworks
/UIKit.framework
/Headers
/UIAccessibility.h:8
(#import <CoreGraphics/CoreGraphics.h>):
In file included from
/System
/Library
/Frameworks
/ApplicationServices.framework
/Versions
/A
/Frameworks
/CoreGraphics.framework
/Headers
/CoreGraphics.h:41
(#include <CoreGraphics/CGDisplayConfiguration.h>):
/System
/Library
/Frameworks
/ApplicationServices.framework
/Versions
/A
/Frameworks
/CoreGraphics.framework
/Headers
/CGDisplayConfiguration.h:8:10: fatal error: 'IOKit/IOKitLib.h' file not found
#include <IOKit/IOKitLib.h>
^
1 error generated.
它肯定就在那里(我在我的项目导航器中看不到IOKit.framework)
所以,我清理和构建并得到相同的错误
提供了什么?您是否安装了完整的iOS SDK?看起来它正在拾取桌面
CoreGraphics.h
标题,该标题使用了CGDisplayConfiguration.h
标题,而iOS标题似乎没有使用该文件。@Petesh正确,我读得还不够。@Petesh我想你是对的,我的项目引用了错误的CoreGraphics.h,但我不明白为什么。我刚刚重新安装了iOSSDK6.1附带的xcode。我还通过以下路径链接CoreGraphics:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/sdk/iPhoneOS6.1.sdk/System/Library/Frameworks/CoreGraphics.framework
,这看起来很正确。@Petesh我还试图从我的项目中完全删除CoreGraphics的链接,但仍然收到相同的错误消息(它不应该告诉我它现在缺少CoreGraphics吗?)。这里有点可疑..您应该检查用于编译代码的编译行;听起来像是引用了部分或不完整的SDK。如果使用xcodebuild从终端编译它,-sysroot
是否设置为适当的值?
Project->Build Phases->Link Binary with Libraries