我的调整有问题,实际上是设置部分。 当我“进行软件包安装”时,它给了我几个与首选项相关的错误。
Tweak.xm中的默认情况下会添加#import。 我在网络上为我的IOS(即5.1.1)找到的标题没有偏好。 但是,即使我自己创建它并将其添加到其余的头文件终端给了我很多连接到preferences.h和其余标题的错误。
请告诉我如何摆脱这些错误并通过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
答案 0 :(得分:1)
感谢Andy Ibanez,问题解决了。 问题出在标题IOSurfaceAPI.h上。 这里描述了类似的https://github.com/peterhajas/MobileNotifier/issues/316
我使用的是来自github.com的rpetrich标题,但从未提及过“_fallback”文件夹。 该文件夹有IOSurfaceAPI.h标头,因此我将其复制到“IOSurface”文件夹中。 之后一切都还可以。 希望它能帮助有同样错误的人。