2013-03-20 55 views
1

我正在尝试为我正在构建的某个调整添加首选项包。我跟着this tutorial的部分添加了偏好包。我尝试添加偏好束后,我的调整失败,出现以下错误编译:Theos无法在添加首选项包后进行编译调整

Making all for tweak MyTweak... 
Preprocessing Tweak.xm... 
Compiling Tweak.xm... 
Linking tweak MyTweak... 
Stripping MyTweak... 
Signing MyTweak... 
Making all in prefs... 
Making all for bundle prefs... 
Copying resource directories into the bundle wrapper... 
Compiling prefs.mm... 
cc1objplus: warnings being treated as errors 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSListController.h:9, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSLocaleController.h:8, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/Preferences.h:9, 
       from prefs.mm:1: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSViewController.h:47: warning: property ‘specifier’ type does not match protocol ‘PSController’ property type 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSViewController.h:47: warning: property ‘rootController’ type does not match protocol ‘PSController’ property type 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSSetupController.h:7, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSInternationalLanguageSetupController.h:7, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/Preferences.h:24, 
       from prefs.mm:1: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/PrivateFrameworks/Preferences.framework/Headers/PSRootController.h:71: warning: property ‘specifier’ type does not match protocol ‘PSController’ property type 
make[3]: *** [obj/prefs.mm.ade1d157.o] Error 1 
make[2]: *** [internal-bundle-all_] Error 2 
make[1]: *** [prefs.all.bundle.variables] Error 2 
make: *** [internal-all] Error 2 

任何想法?

谢谢。

回答

1

您的版本的标题可能会混乱,因为它们是私人框架标题,而不是官方的Apple标题。

两个可能的解决方案:

  1. 从更好地源重新下载标头。经常推荐使用rpetrich's versions

  2. 如果这不起作用,请手动编辑标题以解决问题。找到包含PSController协议(可能是PSController.h)的标头,检查specifier应该是什么类型,然后在PSViewController.h中进行更改。我相信在第一次处理偏好套餐时,我必须这样做。

+0

谢谢。我试着解决方案1,只是得到更多的错误,所以我恢复到我以前的文件,并将尝试解决方案2.虽然看着头文件,我注意到iOSOpenDev修改它们(我安装了iOSOpenDev前一段时间来尝试和我目前没有使用它)。我决定重新安装Xcode(包括iOS SDK),看看是否可以解决问题。 – 2013-03-20 17:33:41

+0

问题已解决。我重新安装了Xcode,然后将rpetrich的头文件下载到$ THEOS/include中,并且还必须cp /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h IOSurface /。然后我得到以下错误: /Volumes/Data/Users/derek/iOSProjects/calleridname/theos/include/IOSurface/IOSurfaceAPI.h:251:error:'xpc_object_t'does not named a type /Volumes/Data /用户/ derek/iOSProjects/calleridname/theos/include/IOSurface/IOSurfaceAPI.h:255:错误:'xpc_object_t'未在此范围内声明 我刚刚评论这些行并且已成功编译。 – 2013-03-20 19:02:00

+0

很高兴为您效力! – drewmm 2013-03-20 20:57:24

相关问题