Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: Compile in GCC?
05-01-2010, 08:10 AM #1Compile in GCC?
Hello guys I havent posted in a while but I have a question.... I have compiled a few programs with GCC but never anything for the iphone.... does anyone here have experience compiling for the iphone? Im pretty sure the commands are not the ones generally used... or am i wrong?
If I was to simply get the c source code and run a simple gcc like
$sudo gcc -c myprogram.c
$sudo gcc myprogram.o -o myprogram
that will not run on the iphone of course so,.... how do I compile it and can it be in C or does it have to be Objec C ?
05-01-2010, 08:39 PM #2
If you're planning on becoming an actual paid iPhone developer, you can use the SDK and Xcode to handle all your compiling needs. On the jailbreaking side of things, you can use a cross-compiler to cross compile your code for the ARM processor in the iPhone. I recommend Crosstool-ng. Its basically a script that creates a cross-compiler for you to use based on whatever system type you select, and they have iPhone and objective-c options.
If cross compiling is an unfamiliar term to you, that would be your first place to start.
05-02-2010, 01:03 PM #3
Hey thanks no no, im already a developer for android so no cross-compiling is not a unknow term to me, actually I have been trying to use Free Pascal for this but I think that the program that you just sent me will most likely be easier to use thanks.... I just wasnt sure btw im using a hackint0sh now... so i dont think I will have any issues problem is that I can not download the Iphone sdk the site only has the latest version and it doesnt run on my hackintosh... I have a different version the 3.1 but it needs mac os 10.5.5 and up... I have 10.5 so I was wondering if i change the systemversion.plist to 10.5.6 do you think I will run after I install it or do you think it will crash?
to late im already editing the .plist and installing I just hope this doesnt mess up my GCC btw the program mentioned above is their a version for Mac? Im trying to use Mac as my main system now.... but if not I will just go back to my main system that is Linux :s
Last edited by victis; 05-02-2010 at 01:03 PM. Reason: Automerged Doublepost
05-02-2010, 02:42 PM #4
You can use Crosstool-ng to make a cross compiler for OS X but the process is a little harder; I think you have to grab a few dependencies yourself to make things work. I know it works great on linux; in about 20 minuets it downloads and compiles everything you need. You can try it on OS X, I have never bothered, I dual boot OS X and Ubuntu on both my Hackintosh and my MacBook Pro and use Ubuntu for Beagle-related development and jailbroken iPhone apps, and use OS X for the official SDK work.
05-03-2010, 07:45 AM #5
If i use the official SDK can i still get those apps put up on Cydia? I already have an APP on cydia but i compiled it with free pascal.... it has a crappy UI thats the problem now in the SDK I already have something I began doing today but I want to know if I will be able to publish it to cydia? I downloaded the SDK today so im new to it.. I got my Hackint0sh like 3 or 4 days ago... I have been downloading stuff and getting it all ready for programming and hacking... but im just not sure if stuff made with the real SDK can be uploaded to cydia... I assume they can but if someone can enlighten me with the process steps?
i tried compiling the software it doesnt run on mac... I gets an error so i went to the site and it seems like they are working on it.... So to get an app made with the SDK onto cydia i need to bypass the apple signature right?
Last edited by victis; 05-03-2010 at 07:45 AM. Reason: Automerged Doublepost