Dynamic library image does not contain x86_64, i386 architecture

I am trying to create a dynamic library for iOS combined with architecture

  • armv7
  • armv7s
  • arm64
  • i386
  • x86_64

Here is my target build setup enter image description here

As you can see, I added x86_64 and i386 to "Architectures and Acceptable Architectures", as well as "Set Active Architecture Only" - NO .

So, after creating my binary, I test the supported architectures by running file myDl.dylib in Terminal

 myDl.dylib (for architecture armv7): Mach-O dynamically linked shared library arm myDl.dylib (for architecture arm64): Mach-O 64-bit dynamically linked shared library 

So this means that it was compiled for armv7 and arm64, and dlopen() failed on the simulator with the error "Unsupported architecture".

What am I doing wrong?

PS. When I use a custom build script and use the lipo tool there to create a complete library, it works fine, but I don't like it and I want it to work fine on Xcode.

+2
ios xcode static-libraries macos
Jan 23 '15 at 11:10
source share
1 answer

Install armv7, armv7s and arm64 in a valid architecture and make sure that you are using a third-party infrastructure that should include 64-bit support.

+2
Jan 23 '15 at 11:18
source share



All Articles