【问题标题】:Really impossible to make package with Theos真的不可能用 Theos 做包
【发布时间】:2014-11-14 20:48:20
【问题描述】:

我真的无法通过 Theos “ma​​ke package” 进行我所做的调整,所以我复制了网络上的“unlockchanger”示例(这里https://github.com/codyd51/Theos-Examples/tree/master/unlockchanger )并尝试做“制作包”。我收到这些错误:

iPhone-di-Gabriele:/var/mobile/unlockchanger root# make package
/var/mobile/unlockchanger/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/unlockchanger/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak UnlockChanger...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
In file included from Tweak.xm:3:
/var/mobile/unlockchanger/theos/include/substrate.h:57:20: error: unknown type name 'pid_t'
bool MSHookProcess(pid_t pid, const char *library);
                   ^
/var/mobile/unlockchanger/theos/include/substrate.h:69:1: error: unknown type name 'IMP'
IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL));
^
/var/mobile/unlockchanger/theos/include/substrate.h:69:42: error: unknown type name 'IMP'
IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL));
                                         ^
/var/mobile/unlockchanger/theos/include/substrate.h:69:79: error: use of undeclared identifier 'NULL'
IMP MSHookMessage(Class _class, SEL sel, IMP imp, const char *prefix _default(NULL));
                                                                              ^
/var/mobile/unlockchanger/theos/include/substrate.h:48:27: note: expanded from macro '_default'
#define _default(value) = value
                          ^
/var/mobile/unlockchanger/theos/include/substrate.h:71:45: error: unknown type name 'IMP'
void MSHookMessageEx(Class _class, SEL sel, IMP imp, IMP *result);
                                            ^
/var/mobile/unlockchanger/theos/include/substrate.h:71:54: error: unknown type name 'IMP'
void MSHookMessageEx(Class _class, SEL sel, IMP imp, IMP *result);
                                                     ^
/var/mobile/unlockchanger/theos/include/substrate.h:125:92: error: use of undeclared identifier 'NULL'
static inline Type_ *MSHookMessage(Class _class, SEL sel, Type_ *imp, const char *prefix = NULL) {
                                                                                           ^
/var/mobile/unlockchanger/theos/include/substrate.h:126:82: error: unknown type name 'IMP'
    return reinterpret_cast<Type_ *>(MSHookMessage(_class, sel, reinterpret_cast<IMP>(imp), prefix));
                                                                                 ^
/var/mobile/unlockchanger/theos/include/substrate.h:132:58: error: unknown type name 'IMP'
    return MSHookMessageEx(_class, sel, reinterpret_cast<IMP>(imp), reinterpret_cast<IMP *>(result));
                                                         ^
/var/mobile/unlockchanger/theos/include/substrate.h:132:86: error: unknown type name 'IMP'
    return MSHookMessageEx(_class, sel, reinterpret_cast<IMP>(imp), reinterpret_cast<IMP *>(result));
                                                                                     ^
/var/mobile/unlockchanger/theos/include/substrate.h:137:5: error: use of undeclared identifier 'Ivar'
    Ivar ivar(class_getInstanceVariable(object_getClass(self), name));
    ^
/var/mobile/unlockchanger/theos/include/substrate.h:138:19: error: use of undeclared identifier 'ivar'
    void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
                  ^
/var/mobile/unlockchanger/theos/include/substrate.h:138:27: error: use of undeclared identifier 'NULL'
    void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
                          ^
/var/mobile/unlockchanger/theos/include/substrate.h:138:34: error: use of undeclared identifier 'NULL'
    void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
                                 ^
/var/mobile/unlockchanger/theos/include/substrate.h:138:89: error: use of undeclared identifier 'ivar'
    void *pointer(ivar == NULL ? NULL : reinterpret_cast<char *>(self) + ivar_getOffset(ivar));
                                                                                        ^
/var/mobile/unlockchanger/theos/include/substrate.h:294:71: error: use of undeclared identifier 'NULL'
    return MSHookFunction(symbol, replace, reinterpret_cast<Type_ **>(NULL));
                                                                      ^
/var/mobile/unlockchanger/theos/include/substrate.h:298:85: error: use of undeclared identifier 'NULL'
static inline void MSHookSymbol(Type_ *&value, const char *name, MSImageRef image = NULL) {
                                                                                    ^
/var/mobile/unlockchanger/theos/include/substrate.h:303:86: error: use of undeclared identifier 'NULL'
static inline void MSHookFunction(const char *name, Type_ *replace, Type_ **result = NULL) {
                                                                                     ^
/var/mobile/unlockchanger/theos/include/substrate.h:310:104: error: use of undeclared identifier 'NULL'
static inline void MSHookFunction(MSImageRef image, const char *name, Type_ *replace, Type_ **result = NULL) {
                                                                                                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [obj/Tweak.xm.7838be1a.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [UnlockChanger.all.tweak.variables] Error 2

一些细节:

  • 我在 iOS8.1 上,使用 iPhone 5。一切都从 Cydia 安装
  • ..在带有 WinSCP 和 PuTTY 的 Windows 8.1 上
  • 我已经安装了 TheosPerl.. 一切(还有“BigBoss 推荐的软件包”)
  • 我还必须安装 LLVM+Clang,因为 make 没有找到“clang++”命令
  • 我尝试转储类,而不是从网络上获取它们
  • 我已经更新了 /include/ 中的 substrate.h 和 /lib/ 中的 libsubstrate.dylib

如果我尝试在我的 SpringBoard 调整中“制作包”,我会在 Tweak.xm 中做:

#import <SpringBoard/Springboard.h>

我收到以下错误:

iPhone-di-Gabriele:/var/mobile/mytweak root# make package
/var/mobile/mytweak/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/mytweak/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak mytweak...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
In file included from Tweak.xm:1:
/var/mobile/mytweak/theos/include/SpringBoard.h:33:19: error: field has incomplete type 'struct CGSize'
    struct CGSize size;
                  ^
/var/mobile/mytweak/theos/include/SpringBoard.h:33:12: note: forward declaration of 'CGSize'
    struct CGSize size;
           ^
/var/mobile/mytweak/theos/include/SpringBoard.h:229:34: error: cannot find protocol declaration for 'NSObject'
@protocol APSConnectionDelegate <NSObject>
                                 ^
/var/mobile/mytweak/theos/include/SpringBoard.h:233:37: error: cannot find protocol declaration for 'NSObject'
@protocol AVExternalDeviceDelegate <NSObject>
                                    ^
/var/mobile/mytweak/theos/include/SpringBoard.h:236:27: error: cannot find protocol declaration for
      'BBSectionIdentity'
@protocol BBDataProvider <BBSectionIdentity>
                          ^
/var/mobile/mytweak/theos/include/SpringBoard.h:240:31: error: cannot find protocol declaration for 'NSObject'
@protocol BBObserverDelegate <NSObject>
                              ^
/var/mobile/mytweak/theos/include/SpringBoard.h:246:30: error: cannot find protocol declaration for 'NSObject'
@protocol BBSectionIdentity <NSObject>
                             ^
/var/mobile/mytweak/theos/include/SpringBoard.h:250:41: error: cannot find protocol declaration for 'NSObject'
@protocol BSSettingDescriptionProvider <NSObject>
                                        ^
/var/mobile/mytweak/theos/include/SpringBoard.h:255:34: error: cannot find protocol declaration for 'NSObject'
@protocol BSTransactionObserver <NSObject>
                                 ^
/var/mobile/mytweak/theos/include/SpringBoard.h:258:31: error: cannot find protocol declaration for 'NSObject'
@protocol BSWatchdogDelegate <NSObject>
                              ^
/var/mobile/mytweak/theos/include/SpringBoard.h:261:38: error: cannot find protocol declaration for 'NSObject'
@protocol CLLocationManagerDelegate <NSObject>
                                     ^
/var/mobile/mytweak/theos/include/SpringBoard.h:264:41: error: cannot find protocol declaration for 'NSObject'
@protocol FBApplicationLibraryObserver <NSObject>
                                        ^
/var/mobile/mytweak/theos/include/SpringBoard.h:267:45: error: cannot find protocol declaration for 'NSObject'
@protocol FBApplicationPlaceholderObserver <NSObject>
                                            ^
/var/mobile/mytweak/theos/include/SpringBoard.h:270:41: error: cannot find protocol declaration for
      'FBProcessObserver'
@protocol FBApplicationProcessObserver <FBProcessObserver>
                                        ^
/var/mobile/mytweak/theos/include/SpringBoard.h:276:37: error: cannot find protocol declaration for 'NSObject'
@protocol FBDisplayManagerObserver <NSObject>
                                    ^
/var/mobile/mytweak/theos/include/SpringBoard.h:279:37: error: cannot find protocol declaration for 'NSObject'
@protocol FBProcessManagerObserver <NSObject>
                                    ^
/var/mobile/mytweak/theos/include/SpringBoard.h:284:30: error: cannot find protocol declaration for 'NSObject'
@protocol FBProcessObserver <NSObject>
                             ^
/var/mobile/mytweak/theos/include/SpringBoard.h:287:35: error: cannot find protocol declaration for 'NSObject'
@protocol FBSceneManagerDelegate <NSObject>
                                  ^
/var/mobile/mytweak/theos/include/SpringBoard.h:293:35: error: cannot find protocol declaration for 'NSObject'
@protocol FBSceneManagerObserver <NSObject>
                                  ^
/var/mobile/mytweak/theos/include/SpringBoard.h:302:46: error: cannot find protocol declaration for 'NSObject'
@protocol FBSynchronizedTransactionDelegate <NSObject>
                                             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [obj/Tweak.xm.0ad6af3a.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [mytweak.all.tweak.variables] Error 2

我真的不知道错在哪里,我真的尝试了一切,也“make -i”但它没有创建dylib文件!

同样使用我的 转储标题,对于 SpringBoard,我得到:

iPhone-di-Gabriele:/var/mobile/test root# make package
/var/mobile/test/theos/makefiles/targets/Darwin-arm/iphone.mk:43: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang.
/var/mobile/test/theos/makefiles/targets/Darwin-arm/iphone.mk:53: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak test...
 Preprocessing Tweak.xm...
 Compiling Tweak.xm...
In file included from Tweak.xm:1:
In file included from /var/mobile/test/theos/include/SpringBoard/SpringBoard.h:9:
In file included from /var/mobile/test/theos/include/SpringBoard/SBBannerContainerViewController.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/UIViewControllerAnimatedTransitioning.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/NSObject.h:8:
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:26:2: error:
      unknown type name 'BOOL'
        BOOL _field1;
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:27:2: error:
      unknown type name 'BOOL'
        BOOL _field2;
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:28:2: error:
      unknown type name 'BOOL'
        BOOL _field3;
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:29:2: error:
      unknown type name 'BOOL'
        BOOL _field4;
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:30:2: error:
      unknown type name 'BOOL'
        BOOL _field5;
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:66:2: error:
      unknown type name 'BOOL'
        BOOL itemIsEnabled[25];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:67:2: error:
      unknown type name 'BOOL'
        BOOL timeString[64];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:70:2: error:
      unknown type name 'BOOL'
        BOOL serviceString[100];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:71:2: error:
      unknown type name 'BOOL'
        BOOL serviceCrossfadeString[100];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:72:2: error:
      unknown type name 'BOOL'
        BOOL serviceImages[2][100];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:73:2: error:
      unknown type name 'BOOL'
        BOOL operatorDirectory[1024];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:80:2: error:
      unknown type name 'BOOL'
        BOOL batteryDetailString[150];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:86:2: error:
      unknown type name 'BOOL'
        BOOL activityDisplayId[256];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:102:2: error:
      unknown type name 'BOOL'
        BOOL _field3[4088];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:116:2: error:
      unknown type name 'BOOL'
        BOOL __opaque[40];
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:162:2: error:
      unknown type name 'BOOL'
        BOOL valid;
        ^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:179:2: error:
      unknown type name 'BOOL'
        BOOL isValid;
        ^
In file included from Tweak.xm:1:
In file included from /var/mobile/test/theos/include/SpringBoard/SpringBoard.h:9:
In file included from /var/mobile/test/theos/include/SpringBoard/SBBannerContainerViewController.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/UIViewControllerAnimatedTransitioning.h:8:
/var/mobile/test/theos/include/SpringBoard/NSObject.h:10:1: error: redefinition
      of 'NSString' as different kind of symbol
@class NSString;
^
/var/mobile/test/theos/include/SpringBoard/SpringBoard-Structs.h:135:3: note:
      previous definition is here
} NSString;
  ^
In file included from Tweak.xm:1:
In file included from /var/mobile/test/theos/include/SpringBoard/SpringBoard.h:9:
In file included from /var/mobile/test/theos/include/SpringBoard/SBBannerContainerViewController.h:8:
In file included from /var/mobile/test/theos/include/SpringBoard/UIViewControllerAnimatedTransitioning.h:8:
/var/mobile/test/theos/include/SpringBoard/NSObject.h:24:3: error: expected a
      type
-(BOOL)respondsToSelector:(SEL)selector;
  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [obj/Tweak.xm.56f06e0e.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [test.all.tweak.variables] Error 2

感谢所有愿意帮助我的人。

【问题讨论】:

    标签: makefile package theos springboard


    【解决方案1】:

    如果您遇到这些错误,请确保您在 Windows没有提取或复制 SDK 文件夹 (iPhoneOSX.X.sdk) , 因为这样你会丢失 sdk 文件之间的每个(符号)链接。所以在 Mac OS、iOS 或 Linux 上管理和组织你的 sdk 文件夹(但我没有尝试过这个)。

    祝你好运!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多