View Full Version : How to compile C dylib for iphone?
pityme
Aug 8, 2008, 10:42 AM
Does anyone know how to compile a dylib on Mac leopard and use it in iphone apps?
Or any hint on how to compile a C program in Mac OSX, and execute it in iphone 2.0 terminal?
DipDog3
Aug 8, 2008, 10:49 AM
execute it in iphone 2.0 terminal?
iPhone 2.0 Terminal...what is this?
pityme
Aug 8, 2008, 11:51 AM
Here is the situation:
I want to write some C program and run it on iPhone.
iPhone has different CPU than the Mac so I have to use a different compiler to compile the codes. I am not sure but I think xcode uses arm-apple-darwin9-gcc instead of a normal gcc for Mac to compile code so the resulting executable could be run on iPhone.
So anyone could tell me if I want to compile a C program by going through :
./configure > make procedure how could I do it?
Cromulent
Aug 8, 2008, 11:55 AM
You do realise that Apple forbids the use of third party libraries on the iPhone don't you? If you do use a solution I doubt you'll be able to release the app on the App Store.
pityme
Aug 10, 2008, 02:58 PM
Thanks for the reply.I have heard about that.
That's why I have to make libaray myself.
Cromulent
Aug 10, 2008, 05:34 PM
That's why I have to make libaray myself.
Well that is my point. No third party libraries at all, even ones written by yourself. I would love to be proved wrong on this as I have a library I would find useful in an iPhone app, but I'm 99% sure that no external libraries are allowed.
pityme
Aug 11, 2008, 05:41 AM
So for the official apple store apps, instead of using dylib and frameworks, I have to compile everything in xcode? oh~~~it's a lot of work then.....
But for the hacked iphone and unofficial apps, ppl still can use libraries right?:D
Do you know how to cross compile iphone program on mac?
here is the command i use to configure the make.
./configure --cross-prefix=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ --enable-cross-compile --cc=arm-apple-darwin9-gcc-4.0.1 --arch=armv
It always shows me "C compiler test failed."
I think it is because the code is not compatiable to the compiler right?Anyone could give some hints?
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.