我有一个问题在我的调整,实际上是设置部分。当我"make package install“时,它会给我几十个与首选项相关的错误。
在Tweak.xm中,默认添加了#import。我在网络上找到的IOS (即5.1.1)的头文件中没有首选项.h。但是,即使我自己创建它并将其添加到headers的其余部分中,Terminal也会给我很多错误,这些错误都连接到parences.h和其余的headers。
请告诉我如何摆脱这些错误,并通过Theos添加一个简单的首选项(设置)。
下面是我将#import<Preferences/Preferences.h>更改为#import<Preferences/PSListController.h>时得到的结果
Compiling prefs.mm...
In the file included from /var/mobile/greet/theos/include/Preferences/PSListController.h:7,
from prefs.mm:1:
/var/var/mobile/greet/theos/include/Preferences/PSViewController.h:7:29: error: UIViewController.h: No such file or directory
cclobjplus: warnings being treated as errors
In the file included from /var/mobile/greet/theos/include/Preferences/PSController-Protocol.h:7,
from /var/mobile/greet/theos/include/Preferences/PSViewController.h:9,
from /var/mobile/greet/theos/include/Preferences/PSListController.h:7,
from prefs.mm:1:
/var/mobile/greet/theos/include/Preferences/NSObject-Protocol.h:7: warning: duplicate declaration for protocol 'NSObject'
In the file included from /var/mobile/greet/theos/include/Preferences/PSListController.h:7,
from prefs.mm:1:
/var/mobile/greet/theos/include/Preferences/PSViewController.h:11: error: expected ';' before '<' token
In the file included from /var/mobile/greet/theos/include/Preferences/PSListController.h:10,
from prefs.mm:1:
/var/mobile/greet/theos/include/Preferences/UIActionSheetDelegate-Protocol.h:9: warning: duplicate declaration for protocol 'UIActionSheetDelegate'
In the file included from /var/mobile/greet/theos/include/Preferences/PSListController.h:11,
from prefs.mm:1:
/var/mobile/greet/theos/include/Preferences/UIAlertViewDelegate-Protocol.h:9: warning: duplicate declaration for protocol 'UIAlertViewDelegate'
In the file included from /var/mobile/greet/theos/include/Preferences/PSListController.h:13,
from prefs.mm:1:
/var/mobile/greet/theos/include/Preferences/UITableViewDataSource-Protocol.h:9: warning: duplicate declaration for protocol 'UITableViewDataSource'
In the file included from /var/mobile/greet/theos/include/Preferences/UITableViewDelegate-Protocol.h:8,
from /var/mobile/greet/theos/include/Preferences/PSListController.h:14,
from prefs.mm:1:
/var/mobile/greet/theos/include/Preferences/UIScrollViewDelegate-Protocol.h:9: warning: duplicate declaration for protocol 'UIScrollViewDelegate'
In the file included from /var/mobile/greet/theos/include/Preferences/PSListController.h:14,
from prefs.mm:1:
In the file included from /var/mobile/greet/theos/include/Preferences/UITableViewDelegate-Protocol.h:10: warning: duplicate declaration for protocol 'UITableViewDelegate'
make[3]: *** [obj/prefs.mm.88233918.o] Error 1
make[2]: *** [internal-bundle-all ] Error 2
make[1]: *** [prefs.all.bundle.variables] Error 2
make: *** [internal-all] Error 2发布于 2013-02-10 05:15:09
多亏了Andy Ibanez,这个问题才得以解决。问题出在头文件IOSurfaceAPI.h上。这里描述了类似的https://github.com/peterhajas/MobileNotifier/issues/316
我使用的是来自github.com的_fallback头文件,但从来没有提到过文件夹“rpetrich”。那个文件夹有IOSurfaceAPI.h头文件,所以我把它复制到了"IOSurface“文件夹。在那之后一切都很好。希望它能帮助有同样错误的人。
https://stackoverflow.com/questions/14615782
复制相似问题