ios - Error compiling tweak in theos -


i set simple tweak using theos following tutorial here. when run make headers here, get

making tweak welcomewagon...  preprocessing tweak.xm...  compiling tweak.xm... in file included tweak.xm:1: /opt/theos//include/springboard/springboard.h:7:26: error: uiapplication.h: no such file or directory cc1objplus: warnings being treated errors in file included /opt/theos//include/springboard/uiapplicationdelegate-protocol.h:7,                  /opt/theos//include/springboard/springboard.h:9,                  tweak.xm:1: /opt/theos//include/springboard/nsobject-protocol.h:7: warning: duplicate declaration protocol ‘nsobject’ in file included /opt/theos//include/springboard/springboard.h:9,                  tweak.xm:1: /opt/theos//include/springboard/uiapplicationdelegate-protocol.h:11: warning: duplicate declaration 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 

after searching around found people using ryan petrich's dumped headers, emptied include folder , put headers in , ran make, output

making tweak welcomewagon...  preprocessing tweak.xm...  compiling tweak.xm... in file included /opt/theos//include/quartzcore/quartzcore-structs.h:11,                  /opt/theos//include/quartzcore/cavaluefunction.h:9,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/coreanimation.h:30,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/quartzcore.h:9,                  /opt/theos//include/uikit/uikit-structs.h:15,                  /opt/theos//include/uikit/uigesturerecognizer.h:6,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiswipegesturerecognizer.h:9,                  /opt/theos//include/uikit/uiswipegesturerecognizer.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uitableview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uipickerview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibilityadditions.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibility.h:12,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uikit.h:10,                  /opt/theos//prefix.pch:4,                  <command-line>:0: /opt/theos//include/iosurface/iosurface.h:20:36: error: iosurface/iosurfaceapi.h: no such file or directory in file included /opt/theos//include/iosurface/iosurface.h:21,                  /opt/theos//include/quartzcore/quartzcore-structs.h:11,                  /opt/theos//include/quartzcore/cavaluefunction.h:9,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/coreanimation.h:30,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/quartzcore.h:9,                  /opt/theos//include/uikit/uikit-structs.h:15,                  /opt/theos//include/uikit/uigesturerecognizer.h:6,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiswipegesturerecognizer.h:9,                  /opt/theos//include/uikit/uiswipegesturerecognizer.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uitableview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uipickerview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibilityadditions.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibility.h:12,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uikit.h:10,                  /opt/theos//prefix.pch:4,                  <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 /opt/theos//include/quartzcore/quartzcore-structs.h:11,                  /opt/theos//include/quartzcore/cavaluefunction.h:9,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/coreanimation.h:30,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/quartzcore.h:9,                  /opt/theos//include/uikit/uikit-structs.h:15,                  /opt/theos//include/uikit/uigesturerecognizer.h:6,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiswipegesturerecognizer.h:9,                  /opt/theos//include/uikit/uiswipegesturerecognizer.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uitableview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uipickerview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibilityadditions.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibility.h:12,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uikit.h:10,                  /opt/theos//prefix.pch:4,                  <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’ not declared in scope in file included /opt/theos//include/quartzcore/cavaluefunction.h:9,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/coreanimation.h:30,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/quartzcore.framework/headers/quartzcore.h:9,                  /opt/theos//include/uikit/uikit-structs.h:15,                  /opt/theos//include/uikit/uigesturerecognizer.h:6,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiswipegesturerecognizer.h:9,                  /opt/theos//include/uikit/uiswipegesturerecognizer.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uitableview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uipickerview.h:11,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibilityadditions.h:10,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uiaccessibility.h:12,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos5.1.sdk/system/library/frameworks/uikit.framework/headers/uikit.h:10,                  /opt/theos//prefix.pch:4,                  <command-line>:0: /opt/theos//include/quartzcore/quartzcore-structs.h:196: error: ‘iosurfaceref’ not name type in file included /opt/theos//include/uikit/uikit2.h:52,                  /opt/theos//include/messageui/messageui-structs.h:8,                  /opt/theos//include/messageui/composerecipient.h:9,                  /opt/theos//include/chatkit/ckmailcomposerecipient.h:6,                  /opt/theos//include/chatkit/chatkit.h:41,                  /opt/theos//include/springboard/springboard-structs.h:13,                  /opt/theos//include/springboard/springboard.h:8,                  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 /opt/theos//include/uikit/uikit2.h:448,                  /opt/theos//include/messageui/messageui-structs.h:8,                  /opt/theos//include/messageui/composerecipient.h:9,                  /opt/theos//include/chatkit/ckmailcomposerecipient.h:6,                  /opt/theos//include/chatkit/chatkit.h:41,                  /opt/theos//include/springboard/springboard-structs.h:13,                  /opt/theos//include/springboard/springboard.h:8,                  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 

could tell me i'm doing wrong? in advance.

i found same problem current version of ryan petrich's dumped headers today.

finally find out solution is,

  1. import dumped springboard headers

  2. copy /system/library/frameworks/iosurface.framework/headers/iosurfaceapi.h /opt/theos/include/iosurface. reason in iosurface/iosurface.h!

  3. if running os x lion or later, may need comment out following lines in /opt/theos/include/iosurface/iosurfaceapi.h:

      /* call lets xpcobject_t holds reference iosurface.     note: live xpc objects created iosurfaceref implicity increase iosurface's global use     count 1 until object destroyed. */     // xpc_object_t iosurfacecreatexpcobject(iosurfaceref asurface)     // iosfc_available_starting(_mac_10_7, __iphone_na);      /* call lets take xpcobject_t created via iosurfacecreateport() , recreate iosurfaceref it. */     // iosurfaceref iosurfacelookupfromxpcobject(xpc_object_t xobj)     // iosfc_available_starting(_mac_10_7, __iphone_na);  

give try!


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -