Saturday, November 15, 2008

iPhone open toolchain2 on Linux

1. install building tools
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential bison flex


2. download the file to your ~ on Linux
UpgradeToolChain2.tgz

The package is very large (about 200M)
download it from http://www.iphonefix.de/
Inside the ftp server goto the folder
iPhoneToolchain VMWare Image / V3
and download the file UpgradeToolChain2.tgz

3. extract it to /usr
cd /usr
sudo tar -xzvf ~/UpgradeToolChain2.tgz

4. login as superuser and build the Darwin CC tools and llvm-gcc in Linux
su
cd /usr/toolchain2
./build_20.sh


5. For example, download this WinterBoard App Source code from the developer and compile it in Linux

wget http://svn.saurik.com/repos/menes/trunk/winterboard/Application.mm

/usr/toolchain2/pre/bin/arm-apple-darwin9-g++ -g0 -O2 -Wall -Werror -o WinterBoard Application.mm \
-framework UIKit -framework Foundation -framework CoreFoundation -lobjc -framework CoreGraphics

6. make sure you set your include and lib path correctly in your Makefile

Enjoy it!


reference: http://iphonesdkdev.blogspot.com/2008/10/how-to-install-llvm-gcc-for-iphone-sdk.html

No comments: