I’m trying to build a static library (lib.a file) for use in creating an ANE file to be used in Adobe Flash Builder. I’m getting link errors as follows:
ld: absolute addressing (perhaps -mdynamic-no-pic) used in -[MyLib getPasswordForUsername:andServiceName:error:] from /var/folders/+A/+Ah7HwXRHxSzVz2bfII3lk+++TI/-Tmp-/9d68c158-05d9-43f5-b2c9-4bc65dbb82ad/libcom.pnpc.cgdv.a(MyLib.o) not allowed in slidable image. Use ‘-read_only_relocs suppress’ to enable text reloc
Compilation failed while executing : ld64
Here is the method signature for the getPasswordForUsername:
- (NSString *)getPasswordForUsername:(NSString *)username andServiceName:(NSString )serviceName error:(NSError *)error;
I’m using Xcode 4.2 iOS SDK 5.0.1 to build this project. There are demo of how to build and debug on the iOS side for ANEs that work but for some reason my own static library is bombing bad.
Any help would be greatly appreciated!!!
Markus
Your Xcode build settings is probably incorrect. Ensure the following:
Mach-O Type = static library
Generate position dependent code = No