Copy link to clipboard
Copied
Hey,
I'm updating an ANE to the latest SDK change. For this new version, I need to add a new lib: libxml2.dylib
So in my platform-ios.xml I've:
<linkerOptions> <option>–lxml2</option> </linkerOptions>
I can compile the ANE, but when exporting on my iPhone I got:
Compilation failed while executing : ld64
Packaging output:
ld: file not found: –lxml2
ld: file not found: –lxml2
It seems the .dylib is no more available through Xcode 7 (El Captain) too, in favor of .tbd files. So how do we update our build file for this new format?
I tried to copy/paste the libxml2.dylib at several places (not sure if the final location changed with El Captain) but without success, still the same issue.
Any ideas?
Copy link to clipboard
Copied
In my ANE, I only use one .dylib, and my syntax is different:
<option>-weak_library /usr/lib/libsqlite3.dylib</option>
As a caveat, I'm not using Xcode 7, and I'm still on AIR SDK 16, so this may not help you.
Copy link to clipboard
Copied
Thanks for your answer. Well, if I do that, no error when compiling the ANE, but for the IPA:
Packaging failed!
Packaging error message:
Compilation failed while executing : ld64
Packaging output:
ld: warning: ignoring file /usr/lib/libxml2.dylib, missing required architecture armv7 in file /usr/lib/libxml2.dylib (2 slices)
ld: warning: ignoring file /usr/lib/libxml2.dylib, missing required architecture arm64 in file /usr/lib/libxml2.dylib (2 slices)
Undefined symbols for architecture armv7:
"_xmlFreeDoc", referenced from:
...
Copy link to clipboard
Copied
sounds like it's missing the dylib at ipa compile time. Are you pointing flash builder to the location of the iOS SDK you're using?
Copy link to clipboard
Copied
Well, I'm using FDT. And at the moment, if I don't specify SDK, I don't know where it is looking for.
If I specify with this one: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk I got:
Packaging failed!
Packaging error message:
Compilation failed while executing : ld64
Packaging output:
Warning: The path to platform sdk should end with iPhoneOSx.x or iPhoneSimulatorx.x format to avoid any unintended behavior.
ld: library not found for -lgcc_s.1
ld: library not found for -lSystem.B
Also, if I try to compile my IPA on windows I also get an ld: file not found: –lxml2
Everything seems related to El Captain 😕
Copy link to clipboard
Copied
ugh. Sorry, I don't have experience with FDT or El Capitan. I'm still on Yosemite and Xcode 6.x . Wish I could be of more help!
Copy link to clipboard
Copied
Ok, I'd luck to give a try on an Yosemite Mac with AIR 19 and in fact I've the same problem. So it's not related to Xcode 7 and El Captain (which is good to know). For whatever reason I can't success to include the libxml2. I can compile the ANE, but I always get an error for the IPA whatever I tried.
Copy link to clipboard
Copied
what is a .tbd file?
Copy link to clipboard
Copied