Skip to main content
Ollie Edge
Inspiring
May 18, 2012
Answered

ADT External static library for ANE required

  • May 18, 2012
  • 2 replies
  • 1785 views

Hey There,

I been attempting to create a native extension for my current project and tried a simple hello world ANE first which I managed to get working fine so I'm now aware of the process to get everything done correctly.

The problem I'm facing now is that I'm using a ".a" static library in my XCode project to build my own ".a" static library. When I compile my ANE Project in ADT I receive the following error (sorry for the formatting).

Undefined symbols for architecture armv7:
"OBJC_CLASS$_EAAccessoryManager", referenced from:

  objc-class-ref in libcom.edgington.HelloWorld.a(TGAccessoryManager.o) 

"OBJC_CLASS$_EASession", referenced from:

  objc-class-ref in libcom.edgington.HelloWorld.a(TGAccessoryManager.o) 

"_EAAccessoryDidConnectNotification", referenced from:

  -[TGAccessoryManager setupManagerWithInterval:forAccessoryType:] in libcom.edgington.HelloWorld.a(TGAccessoryManager.o) 

"OBJC_METACLASS$_EAAccessory", referenced from:

  _OBJC_METACLASS_$_TGAccessory in libcom.edgington.HelloWorld.a(TGAccessory.o) 

"OBJC_CLASS$_EAAccessory", referenced from:

  _OBJC_CLASS_$_TGAccessory in libcom.edgington.HelloWorld.a(TGAccessory.o) 

ld: symbol(s) not found for architecture armv7

The command line I'm using is:
/Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0/bin/adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore IOSFP.p12 -provisioning-profile HelloWorld.mobileprovision HelloWorld.ipa HelloWorldIOS-app.xml HelloWorldIOS.swf -extdir extensionDir/ -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk

I've been looking at many other forums posts and sites about how to do this, but I'm still oblivious to the problem, I feel like I need to be spoon feed in order to understand! I feel that this following post if relivant to my question but still, I don't understand fully:

http://forums.adobe.com/message/4269570#4269570

Can anyone point me in the right direction?

I've been looking at many other forums posts and sites about how to do this, but I'm still oblivious to the problem, I feel like I need to be spoon feed in order to understand! I feel that this following post if relivant to my question but still, I don't understand fully:

This topic has been closed for replies.
Correct answer Ollie Edge

Ah I found the problem, ExternalAccessory.framework is not included in the default list of frameworks provided by AIR. Creating a platforms options switch with this library noted within it has sorted the problem. Here is what I did to fix it:

Created options.xml:

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

    <sdkVersion>5.0</sdkVersion>

    <linkerOptions>

        <!-- to use the ExternalAccessory framework -->

        <option>-framework ExternalAccessory</option>

    </linkerOptions>

</platform>

added "-platformoptions options.xml" on the end of the command line to build it.

Errors gone.

2 replies

Ollie Edge
Ollie EdgeAuthorCorrect answer
Inspiring
May 18, 2012

Ah I found the problem, ExternalAccessory.framework is not included in the default list of frameworks provided by AIR. Creating a platforms options switch with this library noted within it has sorted the problem. Here is what I did to fix it:

Created options.xml:

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

    <sdkVersion>5.0</sdkVersion>

    <linkerOptions>

        <!-- to use the ExternalAccessory framework -->

        <option>-framework ExternalAccessory</option>

    </linkerOptions>

</platform>

added "-platformoptions options.xml" on the end of the command line to build it.

Errors gone.

chris.campbell
Legend
May 19, 2012

Glad you were able to solve this.  Thank you for posting back with the solution.