1

I'am finalising an Open Source C coded CometD library, i thought it would be a good idea to open it to OSX/iOS users, like myself.

In order to ease up the work for OSX/iOS developers i wanted to switch from a static C library to a Xcode iOS Framework. So i followed advices found on the net, and generated a static iOS compatible library from Xcode before wrapping it in a iOS FrameWork.

I made sure that "Architectures" is "Standard armv7 armv64" and the "Base SDK" is put to "Latest iOS" then i compiled, some warnings popped out but library generated successfully and gave me a Product.a .

The problem is that i can't include it in any other iOS project. As soon as i put the library and the headers in any iOS project i found a sea of error telling me :

ignoring file * * *.a, file was built for archive which is not the architecture being linked (i386): * * *.a Undefined symbols for architecture i386:

...

  • barely all c functions

...

But it has compiled as a compatible iOS static library ? Why yelling at me for a i386 architecture ? Mind Blowing !

I fetched the interweb but no real answer was found.

So my question is, is it possible to make such a thing (C library inside iOS FrameWork) ? If yes (hopefully), how to avoid the errors and make it actually compile and produce a product ?

Any Answer would be much appreciated, Thank you for reading.

6
  • Hi. Do you understand why got this error? You should build universal framework (standart arch + i386 arch for simulator). E.g. read this link. Commented Jul 27, 2015 at 12:43
  • Hi :), no honestly i don't understand why, i got the idea that IOS development can have different arm architectures, but if i ask for a iOS library shouldn't it work with a iOS Framework ? I know that the answer is no and it is more complicated than that, but i find it really frustrating to get stuck in such configuration step at the end of a long project. I read the link you gave me, thank you. Following the link lead me to get rid of the i386 error and made my Framework exportable on projects but now i get a x86_64 missing symbols error. Even if Xcode show me the Func in autocompletion. Commented Jul 28, 2015 at 7:46
  • Do you get this error when building the app for device, e.g. iphone ? Commented Jul 28, 2015 at 8:28
  • Yes exactly, when i build for a defined device like Iphone 6... i get the x86_64 error. i can provide you my project or the code to see if its too blurry. Commented Jul 28, 2015 at 8:56
  • Ok. Post the link to your project. Commented Jul 28, 2015 at 9:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.