Question

I have a problem with my tweak, actually the settings part. When I "make package install" it gives me a couple dozens of errors connected to Preferences.

in Tweak.xm there is #import by default is added. The headers that I've found in the web for my IOS (that is 5.1.1) are without preferences.h. But even if I create it myself and add it to the rest of headers Terminal gives me a LOT of errors connected to preferences.h and the rest of headers.

Please tell me how to get rid of these errors and add a simple preferences (settings) via Theos.

Here is what I got when changed #import<Preferences/Preferences.h> to #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
Was it helpful?

Solution

Thanks to Andy Ibanez the question is solved. The problem was with the header IOSurfaceAPI.h. Similar was described here https://github.com/peterhajas/MobileNotifier/issues/316

I was using rpetrich's headers from github.com but never mentioned a folder "_fallback". That folder had IOSurfaceAPI.h header so I copied it to "IOSurface" folder. Everything was OK after that. Hope it'll help someone with the same error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top