0

I have created static library and it's working fine for device but giving warning "ignoring file ../Test/build/Debug-iphoneos/libTest.a, missing required architecture i386 in file" if I try to deploy it on simulator and hence gives error for all references of that library.

I have read about this error on SOF but not got any workaround for this. I have followed this link to create and use static library.

http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/

So please give solution for this.

Thanks in adv.

Pooja M. Bohora
  • 1,311
  • 1
  • 14
  • 42

1 Answers1

0

These can be quite the pain in the ass. The long and the short of it is that you need to add i386 to your architecture for your static library and rebuild it. If you are using Xcode 4, your problems get compounded even further because your library doesn't build into one nice neat little libMy.a file. You end up with 4 different files depending on your setup.

You can read this answer on Build fat static library for Simulator and Device. This helped me out more than you can imagine.

If you get that far, don't forget about your headers and linker flags. Using static libraries can be great, but they can also be a pain. Hope this helps a little.

Community
  • 1
  • 1
Bill Burgess
  • 14,054
  • 6
  • 49
  • 86