Skip to main content
Participant
February 1, 2012
Question

Creating a native extension that needs to link to libicucore.dylib

  • February 1, 2012
  • 1 reply
  • 2551 views

I'm trying to get ADT to link with libicucore.dylib and I've read http://blogs.adobe.com/rajorshi/2011/11/16/ios5-support-for-airusing-external-sdks-to-package-apps/ multiple times.

I've created a file called platformoptions.xml that looks like:

<platform xmlns=”http://ns.adobe.com/air/extension/3.1″>

     <sdkVersion>5.0</sdkVersion>
     <linkerOptions>
          <option>-licucore</option>
     </linkerOptions>
</platform>


And I've added -platformoptions platformoptions.xml to my ane build script, so it looks like:

../../../AdobeAIRSDK/bin/adt -package -target ane myNativeExtension.ane extension.xml -swc myNativeExtension.swc -platform iPhone-ARM library.swf myNativeExtension.a -platformoptions platformoptions.xml

I've also added the following to the command line when packaging the application using ADT -platformsdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/, so it looks like:

../../AdobeAIRSDK/bin/adt -package -target ipa-debug -connect 10.0.1.7 -storetype pkcs12 -keystore "./iphone_dev.p12" -storepass *** -provisioning-profile "./my.mobileprovision" "myLibTester.ipa" "myLibTester-app.xml" "BFGLibTester.swf" "icon" "Default@2x~iphone.png" "Default~iphone.png" "Default-Landscape.png" "Default-Portrait.png" -extdir "./extensions" -platformsdk "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/"

But I’m still getting undefined symbols for everything from that library:

"_uregex_appendTail", referenced from:

      _rkl_replaceAll in libcom.my.NativeExtensions.ios.mylibNativeExtension.a(RegexKitLite.o)

etc...

Any advice would be appreciated.

Thanks,

Michelle

This topic has been closed for replies.

1 reply

February 2, 2012

Have you added -licucore in Other Linker flags under Xcode project settings, while creating your .a?

Participant
February 2, 2012

I was including the framework libicucore.dylib in the project, but I don't think you can add -licucore to a static library or you'll get linker errors. -licucore is not an object file (not allowed in a library). Including the framework was just because I was being paranoid and I think it is ignored. Typically you only need to add framework or -licucore to application including the static library.

Do you know of a way to add -licucore to static library when building in xcode? Have you seen this work in creating the final application?

Any thoughts? This is has completely stopped our progress so any help would be great.

Thanks,

Michelle

February 2, 2012

I was talking about going to your Xcode settings>Build>Linking> and adding -licucore in the Other Linker Flags section. I haven't tried this though.