0
votes

I created a static library (XXX.a) (which has 3 static libraries inside(aaa.a, bbb.a, ccc.a)) and added it into a pre-developed project (someonesProject). When I lipo -info to XXX.a I see the following architectures: armv7, i386, x86_64, arm64

When I try to run this project, I receive an error:

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_aaa", referenced from: objc-class-ref in XXX.a(XXX.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

When I remove arm64 from the valid-architectures (arm64, armv7 armv7s) of the project (someonesProject), then I can run the app.

How can I fix this issue, I want to make this project work without removing arm64?

I really need help.

Thanks

E.

1
It looks like the linker is getting confused by the arm64 slice of your archive file and failing. Are you using a very old version of OS X or Xcode? Are you sure you're using the linker that came with your SDK?Variable Length Coder
OS X and Xcode are the latest.user984694
@Ervin Aydin Did you manage to solve the issue? or to find the reason?Alienpenguin

1 Answers

0
votes

All your static libraries have to be compatible with arm64 if you want to compile your project with this architecture. So I guess at least one of aaa.a, bbb.a and ccc.a is not compatible with arm64.