2012-06-05 1 views
1

Я установил простой трюк, используя theos, следуя учебному пособию here. Однако, когда я бег сделать с заголовками из here, я получаюОшибка компиляции настроек в темах

Making all for tweak WelcomeWagon... 
Preprocessing Tweak.xm... 
Compiling Tweak.xm... 
In file included from Tweak.xm:1: 
/opt/theos//include/SpringBoard/SpringBoard.h:7:26: error: UIApplication.h: No such file or directory 
cc1objplus: warnings being treated as errors 
In file included from /opt/theos//include/SpringBoard/UIApplicationDelegate-Protocol.h:7, 
       from /opt/theos//include/SpringBoard/SpringBoard.h:9, 
       from Tweak.xm:1: 
/opt/theos//include/SpringBoard/NSObject-Protocol.h:7: warning: duplicate declaration for protocol ‘NSObject’ 
In file included from /opt/theos//include/SpringBoard/SpringBoard.h:9, 
       from Tweak.xm:1: 
/opt/theos//include/SpringBoard/UIApplicationDelegate-Protocol.h:11: warning: duplicate declaration for protocol ‘UIApplicationDelegate’ 
/opt/theos//include/SpringBoard/UIApplicationDelegate-Protocol.h:35: error: duplicate property declaration ‘window’ 
make[2]: *** [obj/Tweak.xm.o] Error 1 
make[1]: *** [internal-library-all_] Error 2 
make: *** [WelcomeWagon.all.tweak.variables] Error 2 

После некоторого поиска вокруг я также обнаружил, что некоторые люди используют сбрасывали заголовки Райан Петричем, так что я опустел включаемую папку и поместить его заголовки и запускал сделайте это с выходом

Making all for tweak WelcomeWagon... 
Preprocessing Tweak.xm... 
Compiling Tweak.xm... 
In file included from /opt/theos//include/QuartzCore/QuartzCore-Structs.h:11, 
       from /opt/theos//include/QuartzCore/CAValueFunction.h:9, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:30, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9, 
       from /opt/theos//include/UIKit/UIKit-Structs.h:15, 
       from /opt/theos//include/UIKit/UIGestureRecognizer.h:6, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISwipeGestureRecognizer.h:9, 
       from /opt/theos//include/UIKit/UISwipeGestureRecognizer.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:12, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, 
       from /opt/theos//Prefix.pch:4, 
       from <command-line>:0: 
/opt/theos//include/IOSurface/IOSurface.h:20:36: error: IOSurface/IOSurfaceAPI.h: No such file or directory 
In file included from /opt/theos//include/IOSurface/IOSurface.h:21, 
       from /opt/theos//include/QuartzCore/QuartzCore-Structs.h:11, 
       from /opt/theos//include/QuartzCore/CAValueFunction.h:9, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:30, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9, 
       from /opt/theos//include/UIKit/UIKit-Structs.h:15, 
       from /opt/theos//include/UIKit/UIGestureRecognizer.h:6, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISwipeGestureRecognizer.h:9, 
       from /opt/theos//include/UIKit/UISwipeGestureRecognizer.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:12, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, 
       from /opt/theos//Prefix.pch:4, 
       from <command-line>:0: 
/opt/theos//include/IOSurface/IOSurfaceAccelerator.h:20: error: ‘IOSurfaceRef’ has not been declared 
/opt/theos//include/IOSurface/IOSurfaceAccelerator.h:20: error: ‘IOSurfaceRef’ has not been declared 
In file included from /opt/theos//include/QuartzCore/QuartzCore-Structs.h:11, 
       from /opt/theos//include/QuartzCore/CAValueFunction.h:9, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:30, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9, 
       from /opt/theos//include/UIKit/UIKit-Structs.h:15, 
       from /opt/theos//include/UIKit/UIGestureRecognizer.h:6, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISwipeGestureRecognizer.h:9, 
       from /opt/theos//include/UIKit/UISwipeGestureRecognizer.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:12, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, 
       from /opt/theos//Prefix.pch:4, 
       from <command-line>:0: 
/opt/theos//include/IOSurface/IOSurface.h:27: error: variable or field ‘IOSurfaceFlushProcessorCaches’ declared void 
/opt/theos//include/IOSurface/IOSurface.h:27: error: ‘IOSurfaceRef’ was not declared in this scope 
In file included from /opt/theos//include/QuartzCore/CAValueFunction.h:9, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CoreAnimation.h:30, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h:9, 
       from /opt/theos//include/UIKit/UIKit-Structs.h:15, 
       from /opt/theos//include/UIKit/UIGestureRecognizer.h:6, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISwipeGestureRecognizer.h:9, 
       from /opt/theos//include/UIKit/UISwipeGestureRecognizer.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UITableView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h:11, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityAdditions.h:10, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:12, 
       from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:10, 
       from /opt/theos//Prefix.pch:4, 
       from <command-line>:0: 
/opt/theos//include/QuartzCore/QuartzCore-Structs.h:196: error: ‘IOSurfaceRef’ does not name a type 
In file included from /opt/theos//include/UIKit/UIKit2.h:52, 
       from /opt/theos//include/MessageUI/MessageUI-Structs.h:8, 
       from /opt/theos//include/MessageUI/ComposeRecipient.h:9, 
       from /opt/theos//include/ChatKit/CKMailComposeRecipient.h:6, 
       from /opt/theos//include/ChatKit/ChatKit.h:41, 
       from /opt/theos//include/SpringBoard/SpringBoard-Structs.h:13, 
       from /opt/theos//include/SpringBoard/SpringBoard.h:8, 
       from Tweak.xm:1: 
/opt/theos//include/UIKit/UIImage2.h:85: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIImage2.h:85: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIImage2.h:85: error: expected `;' before ‘)’ token 
/opt/theos//include/UIKit/UIImage2.h:86: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIImage2.h:86: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIImage2.h:86: error: expected `;' before ‘)’ token 
/opt/theos//include/UIKit/UIImage2.h:91: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIImage2.h:91: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIImage2.h:91: error: expected `;' before ‘)’ token 
In file included from /opt/theos//include/UIKit/UIKit2.h:448, 
       from /opt/theos//include/MessageUI/MessageUI-Structs.h:8, 
       from /opt/theos//include/MessageUI/ComposeRecipient.h:9, 
       from /opt/theos//include/ChatKit/CKMailComposeRecipient.h:6, 
       from /opt/theos//include/ChatKit/ChatKit.h:41, 
       from /opt/theos//include/SpringBoard/SpringBoard-Structs.h:13, 
       from /opt/theos//include/SpringBoard/SpringBoard.h:8, 
       from Tweak.xm:1: 
/opt/theos//include/UIKit/UIWindow2.h:19: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:19: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:19: error: expected `;' before ‘)’ token 
/opt/theos//include/UIKit/UIWindow2.h:20: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:20: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:20: error: expected `;' before ‘)’ token 
/opt/theos//include/UIKit/UIWindow2.h:21: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:21: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:21: error: expected `;' before ‘)’ token 
/opt/theos//include/UIKit/UIWindow2.h:116: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:116: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:116: error: expected `;' before ‘)’ token 
/opt/theos//include/UIKit/UIWindow2.h:117: error: expected type-specifier before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:117: error: expected `)' before ‘IOSurfaceRef’ 
/opt/theos//include/UIKit/UIWindow2.h:117: error: expected `;' before ‘)’ token 
make[2]: *** [obj/Tweak.xm.o] Error 1 
make[1]: *** [internal-library-all_] Error 2 
make: *** [WelcomeWagon.all.tweak.variables] Error 2 

Может ли кто-нибудь сказать мне, что я делаю неправильно? Заранее спасибо.

ответ

0

Вам не нужно импортировать выгруженные заголовки Springboard.

14

Я нашел ту же самую проблему с текущей версией сбрасываемых заголовков Райана Петрича сегодня.

Наконец я считаю, что решение,

  1. Импорт сброшенные заголовки Трамплин

  2. Копировать /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h в/неавтоматического/Теос/включать/IOSurface. Причина в IOSurface/IOSurface.h!

  3. Если вы работаете в OS X Lion или более поздней версии, вам может понадобиться закомментировать следующие строки в /opt/theos/include/IOSurface/IOSurfaceAPI.h:

 

    /* This call lets you get an xpcobject_t that holds a reference to the IOSurface. 
    Note: Any live XPC objects created from an IOSurfaceRef implicity increase the IOSurface's global use 
    count by one until the object is destroyed. */ 
    // xpc_object_t IOSurfaceCreateXPCObject(IOSurfaceRef aSurface) 
    // IOSFC_AVAILABLE_STARTING(_MAC_10_7, __IPHONE_NA); 

    /* This call lets you take an xpcobject_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it. */ 
    // IOSurfaceRef IOSurfaceLookupFromXPCObject(xpc_object_t xobj) 
    // IOSFC_AVAILABLE_STARTING(_MAC_10_7, __IPHONE_NA); 

Отдай попробуйте!

+0

Спасибо, он работал – Igor

+1

как импортировать затопленных заголовки? – Sobiaholic

+0

Как импортировать сбрасываемые заголовки –

2

Я только что сделал это сегодня 13.02.2012 и нашел выше, чтобы быть несколько полезным. С небольшим мозгом и помощью Google я нашел то, что вам нужно сделать, это:

1.) Получить заголовки - использовать поиск Google для «сбрасывали заголовки Райан Петричем в», который приведет вас к: https://github.com/rpetrich/iphoneheaders

2.) Используй мерзавец клонировать репозиторий Git клон https://github.com/rpetrich/iphoneheaders

3.) запустить сделать (я обнаружил, что мне нужно, чтобы запустить сделать как Sudo сделать из-за расположения Теоса быть установлены в/неавтоматическом)

.

4.) Для каждого «файла ошибки не найден» я скопировал включенные файлы в свой проект.

5.) Я считаю, что вы должны закончить следующие папки в папку проекта: AccountSettings IOKit SpringBoard ActorKit IOSurface TelephonyUI AppSupport JavaScriptCore Tutorial.plist Availability2.h MIME Tweak.xm ChatKit Makefile Tweak.xm .original CoreFoundation MediaPlayer UIKit CoreGraphics Сообщение WebCore DAVKit MessageUI WebKit контрольной DataAccess MusicLibrary Foundation PhotoLibrary OBJ GraphicsServices QuartzCore Теос

6.) Вам нужно сделать # 2 из вышеприведенного ответа «Copy /System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceAPI.h to/opt/theos/include/IOSurface. Причина в IOSurface/IOSurface.h! "

7.) Вам также необходимо внести изменения из ответа выше.« Если вы используете OS X Lion, вам может потребоваться прокомментировать следующие строки в/opt /theos/include/IOSurface/IOSurfaceAPI.h:»

/* This call lets you get an xpcobject_t that holds a reference to the IOSurface. 
Note: Any live XPC objects created from an IOSurfaceRef implicity increase the IOSurface's global use 
count by one until the object is destroyed. */ 
// xpc_object_t IOSurfaceCreateXPCObject(IOSurfaceRef aSurface) 
// IOSFC_AVAILABLE_STARTING(_MAC_10_7, __IPHONE_NA); 

/* This call lets you take an xpcobject_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it. */ 
// IOSurfaceRef IOSurfaceLookupFromXPCObject(xpc_object_t xobj) 
// IOSFC_AVAILABLE_STARTING(_MAC_10_7, __IPHONE_NA); 

FYI в моем IOSurfaceAPI.h это были линии вокруг номера строки 252/253

 Смежные вопросы

  • Нет связанных вопросов^_^