Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22117

How do I build a static library for iPhone?

$
0
0

I think that I've looked everywhere for an answer to my problem but without any luck.

I'm trying to create a simple static lib to run on the iPhone device but I keep ending up with XCode saying that "file is not of required architecture" and I've tried every build flag that I found without any luck.

I've got it to work on the emulator building it like this:

$gcc-4.2 -c StaticHelloWorld.c -o StaticHelloWorld.o
$ar rcs libstatichelloworld.a StaticHelloWorld.o

But how do I build it for device?


Viewing all articles
Browse latest Browse all 22117

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>