Skip to main content
Participant
August 31, 2012
Answered

iOS native extension build fails on "Undefined symbols for architecture armv7"

  • August 31, 2012
  • 2 replies
  • 5403 views

I'm building a set of native extensions for iOS with Air 3.4, but when I try to build a test actionscript project including the ANE I get the following error:

Undefined symbols for architecture armv7:

  "_null", referenced from:

      _g_com_adobe_air_fre_fmap in extensionglue.o

     (maybe you meant: _sqlite3_bind_null, __ZN7avmplus20BitmapDataJPEGWriter14jpeg_null_charEP18jpeg_common_structPc , __ZN7CString16s_nullTerminatorE , __ZN7avmplus7AvmCore24decrementAtomRegion_nullEPii , _null_name , __ZN7avmplus20BitmapDataJPEGWriter9jpeg_nullEP18jpeg_common_struct , _sqlite3_result_null , __ZN7UString16s_nullTerminatorE , _null_name1 )

ld: symbol(s) not found for architecture armv7

Compilation failed while executing : ld64

My ANE is targetting iOS 5.1, and I've forced Xcode to build the static library just for armv7 ( setting 'Valid Architectures' to 'armv7' and 'Build Active Architecture Only' to 'Yes' )

Tried using Flash Builder 4.6 & 4.7 beta with the same results.

Does anyone have any advice on build settings for ANEs in Xcode, or have experienced this issue before? Cheers.

This topic has been closed for replies.
Correct answer

Hi,

We were able to figure out the issue and it will be fixed in the next release.

For now, a possible workaround is to always use the finalizer function in the ANE. So, the following steps will need to be followed:

1) In the ANE native code, a new function, with the signature of FREFinalizer() needs to be written. Refer to http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b14-53a8419b 129382b5758-8000.html for the prototype. It could contain minimal code or simply a return statement also. eg.

void minimalFinalizerFunction(void * extData)

{

return;

}

2) In the extension.xml, include this line, after the <initializer> tag:

<finalizer>minimalFinalizerFunction</finalizer>

3) Re-package your ANE using the new .a and extension.xml.

2 replies

Correct answer
September 3, 2012

Hi,

We were able to figure out the issue and it will be fixed in the next release.

For now, a possible workaround is to always use the finalizer function in the ANE. So, the following steps will need to be followed:

1) In the ANE native code, a new function, with the signature of FREFinalizer() needs to be written. Refer to http://help.adobe.com/en_US/air/extensions/WSb464b1207c184b14-53a8419b 129382b5758-8000.html for the prototype. It could contain minimal code or simply a return statement also. eg.

void minimalFinalizerFunction(void * extData)

{

return;

}

2) In the extension.xml, include this line, after the <initializer> tag:

<finalizer>minimalFinalizerFunction</finalizer>

3) Re-package your ANE using the new .a and extension.xml.

luuts_Author
Participant
September 3, 2012

Ah brilliant, that's sorted it. Didn't know it was necessary to include the finaliser.

Thanks!

mbhagya
Participating Frequently
August 31, 2012

Are you using any library/framework?

Have you specified its name in platformoptions.xml?