<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.theiphonewiki.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DanteAllegria</id>
	<title>The iPhone Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.theiphonewiki.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=DanteAllegria"/>
	<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/wiki/Special:Contributions/DanteAllegria"/>
	<updated>2026-04-04T05:56:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.14</generator>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Toolchain_2.0&amp;diff=2848</id>
		<title>Toolchain 2.0</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Toolchain_2.0&amp;diff=2848"/>
		<updated>2009-01-19T08:13:52Z</updated>

		<summary type="html">&lt;p&gt;DanteAllegria: /* Misc. Issues */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to build a tool chain for iPhone OS 2.0. &lt;br /&gt;
&lt;br /&gt;
'''Please note that this section is under development.'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Mac OS X ==&lt;br /&gt;
Until a valid iPhone ARM toolchain installer can be legally distributed throughout the public (grr NDA), the alternative is simple. Install the Apple iPhone SDK, and use it's compiler, and specify the correct architecture, like so:&lt;br /&gt;
&lt;br /&gt;
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk&lt;br /&gt;
&lt;br /&gt;
For extra headers that you have either obtained from an external source, or dumped from the iphone or iphone simulator frameworks yourself, place them in a custom include directory and pass the -I option through the compiler like so:&lt;br /&gt;
&lt;br /&gt;
..../gcc -I &amp;quot;YOUR INCLUDE DIRECTORY&amp;quot;.......&lt;br /&gt;
&lt;br /&gt;
Use saurik's codesign tool (ldid) to sign the binary like so:&lt;br /&gt;
&lt;br /&gt;
ldid -S &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More on this coming soon.&lt;br /&gt;
&lt;br /&gt;
== Windows XP ==&lt;br /&gt;
&lt;br /&gt;
=== Extraction of iPhone OS 2.0 SDK ===&lt;br /&gt;
''Please Note: As of 7-Zip 4.59 Beta, support is available for .DMG and XAR-format archives. 7-Zip is now capable of completely extracting iPhone 2.0 SDK Package.''&lt;br /&gt;
* Download the iPhone OS 2.0 SDK from [http://developer.apple.com/iphone/index.action Apple iPhone Dev Center].&lt;br /&gt;
* Download and install ''HFSExplorer'' from [http://hem.bredband.net/catacombae/hfsx.html catacombae software].&lt;br /&gt;
* Start ''HFSExplorer'' and choose the menu ''File&amp;amp;rarr;Open UDIF Disk Image (.dmg)...''&lt;br /&gt;
* Select the iPhone 2.0 SDK disk image ''iphone_sdk_final.dmg'' and press ''Open''&lt;br /&gt;
* When the tool asks ''Which partition to read'' leave it at ''&amp;quot;Mac_OS_X&amp;quot; (Apple_HFS)'' and press ''OK''&lt;br /&gt;
* Go to ''Packages'' and select the package you want to extract, e.g. ''iPhoneSDKHeadersAndLibs.pkg'' for the iPhone OS 2.0 header files.&lt;br /&gt;
* With right mouse button choose ''Extract data'' to extract an installation package.&lt;br /&gt;
* Please note that in order to extract this .pkg file on Windows, you must compile xar using Cygwin.  Make sure you have libxml2, libxml2-devel, openssl and openssl-devel.  You can then follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
Currently we can only describe how to get the headers from the iPhone OS 2.0 SDK.&lt;br /&gt;
&lt;br /&gt;
=== Extraction of iPhone OS 2.0 Installation Packages (.pkg) ===&lt;br /&gt;
* Extract &amp;lt;tt&amp;gt;iPhoneSDKHeadersAndLibs.pkg&amp;lt;/tt&amp;gt; from iPhone OS 2.0 SDK:&lt;br /&gt;
 mount -t hfs -o loop /path/to/iphone_sdk_final.dmg /somepath/somedir&lt;br /&gt;
:Copy &amp;lt;tt&amp;gt;iPhoneSDKHeadersAndLibs.pkg&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;/somepath/somedir&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Use the ''[http://code.google.com/p/xar/ eXtensible ARchiver]'' &amp;lt;tt&amp;gt;xar&amp;lt;/tt&amp;gt; to extract the file &amp;lt;tt&amp;gt;Payload&amp;lt;/tt&amp;gt; file containing the actual header files:&lt;br /&gt;
 xar -xf iPhoneSDKHeadersAndLibs.pkg Payload&lt;br /&gt;
*Extract the contents of the resulting &amp;lt;tt&amp;gt;Payload&amp;lt;/tt&amp;gt; file&lt;br /&gt;
 zcat Payload | cpio -id&lt;br /&gt;
or&lt;br /&gt;
 zcat Payload | cpio -id '*.h'&lt;br /&gt;
to extract only all header files included in the package.&lt;br /&gt;
&lt;br /&gt;
=== Framework Headers ===&lt;br /&gt;
This section assumes that&lt;br /&gt;
 zcat Payload | cpio -id '*.h'&lt;br /&gt;
got used in previous section.&lt;br /&gt;
&lt;br /&gt;
If you want to move all Framework headers into an ''include'' directory continue&lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
* Remove the project XCode templates since they will not be required anymore:&lt;br /&gt;
 rm -rf Platforms/iPhoneOS.platform/Developer/Library&lt;br /&gt;
&lt;br /&gt;
* Create your target ''include'' directory:&lt;br /&gt;
 mkdir include&lt;br /&gt;
&lt;br /&gt;
* Get just the ''System'' and ''usr'' directories from the iPhone Os 2.0 SDK and remove the empty ''Platforms'' directory hierarchy:&lt;br /&gt;
 mv Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/* .&lt;br /&gt;
 rmdir -p Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/&lt;br /&gt;
&lt;br /&gt;
* Move the Framework headers to current directory and clean-up empty directory hierarchy:&lt;br /&gt;
 mv System/Library/Frameworks/* .&lt;br /&gt;
 rmdir -p System/Library/Frameworks/&lt;br /&gt;
&lt;br /&gt;
* Rename/move all Framework header directories into ''include'' directory and cleanup&lt;br /&gt;
 mv AddressBook.framework/Headers include/AddressBook&lt;br /&gt;
 mv AddressBookUI.framework/Headers include/AddressBookUI&lt;br /&gt;
 mv AudioToolbox.framework/Headers include/AudioToolbox&lt;br /&gt;
 mv AudioUnit.framework/Headers include/AudioUnit&lt;br /&gt;
 mv CFNetwork.framework/Headers include/CFNetwork&lt;br /&gt;
 mv CoreAudio.framework/Headers include/CoreAudio&lt;br /&gt;
 mv CoreFoundation.framework/Headers include/CoreFoundation&lt;br /&gt;
 mv CoreGraphics.framework/Headers include/CoreGraphics&lt;br /&gt;
 mv CoreLocation.framework/Headers include/CoreLocation&lt;br /&gt;
 mv Foundation.framework/Headers include/Foundation&lt;br /&gt;
 mv MediaPlayer.framework/Headers include/MediaPlayer&lt;br /&gt;
 mv OpenAL.framework/Headers include/OpenAL&lt;br /&gt;
 mv OpenGLES.framework/Headers include/OpenGLES&lt;br /&gt;
 mv QuartzCore.framework/Headers include/QuartzCore&lt;br /&gt;
 mv Security.framework/Headers include/Security&lt;br /&gt;
 mv SystemConfiguration.framework/Headers include/SystemConfiguration&lt;br /&gt;
 mv UIKit.framework/Headers include/UIKit&lt;br /&gt;
 rmdir -p *.framework&lt;br /&gt;
&lt;br /&gt;
* The above commands can also be simplified (and can be applied to other versions of SDKs, for example, iPhone SDK 2.2) using a bash shell command:&lt;br /&gt;
 for a in *.framework; do mv $a/Headers include/${a%.*}; done&lt;br /&gt;
 rmdir -p *.framework&lt;br /&gt;
&lt;br /&gt;
* The remaining directories are ''include'' with all Framework headers and ''usr'' with all system related headers.&lt;br /&gt;
&lt;br /&gt;
* Move the ''usr/include'' headers also into new ''include'' directory, remove ''usr/lib'' since gcc includes will not be needed (at least not on iPhone toolchain), and clean up:&lt;br /&gt;
 mv usr/include/* include/&lt;br /&gt;
 rm -rf usr/lib&lt;br /&gt;
 rmdir -p usr/include/&lt;br /&gt;
&lt;br /&gt;
* You may still remove the ''Payload'' file since we don't need it anymore:&lt;br /&gt;
 rm Payload&lt;br /&gt;
&lt;br /&gt;
* Create a tar file so that you can directly transfer to your iPhone:&lt;br /&gt;
 tar --group 0 --owner 0 -cvf include.tar include&lt;br /&gt;
&lt;br /&gt;
* You are done.&lt;br /&gt;
&lt;br /&gt;
* Now you may transfer the ''include.tar'' to your iPhone (as user root), login to your iPhone via ssh and execute following commands to extract the header files (on your iPhone):&lt;br /&gt;
 cd /var&lt;br /&gt;
 tar xf /private/var/root/include.tar&lt;br /&gt;
&lt;br /&gt;
== iPhone/iPod Touch ==&lt;br /&gt;
There is a tool chain available after jailbreak from the [[Cydia|Cydia installer]]. You just need to install&lt;br /&gt;
the '''GNU C Compiler''' from Cydia to get the development environment on your iPhone&lt;br /&gt;
or iPod Touch. BigBoss has some comments on this Toolchain on his&lt;br /&gt;
webpage ''[http://thebigboss.org/moreinfo/Toolchain2.php Toolchain 2.0]''.&lt;br /&gt;
&lt;br /&gt;
If you want to use the header files from iPhone OS 2.0, you can obtain them from the&lt;br /&gt;
iPhone OS 2.0 SDK as described in section ''[[#Framework Headers|Framework Headers]]''.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
When using iphone-gcc ( the native compiler ) to compile iPhone applications, you must do one of the following:&lt;br /&gt;
# Patch the SDK header files for use with the compiler ( stupid thing doesn't like the new headers! ) or&lt;br /&gt;
# Use the old header files ( which are great, but some things dont work/exist the same anymore! ) or&lt;br /&gt;
# Use the following settings in your Makefile to avoid warnings and errors during compilation and linking:&lt;br /&gt;
 CC=/usr/bin/gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS=-fsigned-char -g -ObjC -fobjc-exceptions \&lt;br /&gt;
   -Wall -Wundeclared-selector -Wreturn-type -Wnested-externs \&lt;br /&gt;
   -Wredundant-decls \&lt;br /&gt;
   -Wbad-function-cast \&lt;br /&gt;
   -Wchar-subscripts \&lt;br /&gt;
   -Winline -Wswitch -Wshadow \&lt;br /&gt;
   -I/var/include \&lt;br /&gt;
   -I/var/include/gcc/darwin/4.0 \&lt;br /&gt;
   -D_CTYPE_H_ \&lt;br /&gt;
   -D_BSD_ARM_SETJMP_H \&lt;br /&gt;
   -D_UNISTD_H_&lt;br /&gt;
 &lt;br /&gt;
 CPPFLAGS=&lt;br /&gt;
 &lt;br /&gt;
 LD=$(CC)&lt;br /&gt;
 &lt;br /&gt;
 LDFLAGS=-lobjc \&lt;br /&gt;
   -F/System/Library/Frameworks \&lt;br /&gt;
   -framework CoreFoundation \&lt;br /&gt;
   -framework Foundation \&lt;br /&gt;
   -framework UIKit \&lt;br /&gt;
   -framework CoreGraphics \&lt;br /&gt;
   -L/usr/lib -lc /usr/lib/libgcc_s.1.dylib \&lt;br /&gt;
   -bind_at_load \&lt;br /&gt;
   -multiply_defined suppress&lt;br /&gt;
&lt;br /&gt;
If you want to test the iPhone 2.0 Toolchain, you may use this [[HelloWorld on iPhone|HelloWorld]] example.&lt;br /&gt;
&lt;br /&gt;
== Misc. Issues ==&lt;br /&gt;
&lt;br /&gt;
For the iPhone 2.2 SDK headers, you might encounter an error about not finding the stdint.h file when compiling natively on the iPhone. In that case, try this:&lt;br /&gt;
  cd /var/include&lt;br /&gt;
  ls stdint.h # make sure it doesn't exist&lt;br /&gt;
  ln -s gcc/darwin/4.0/stdint.h stdint.h&lt;/div&gt;</summary>
		<author><name>DanteAllegria</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Toolchain_2.0&amp;diff=2847</id>
		<title>Toolchain 2.0</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Toolchain_2.0&amp;diff=2847"/>
		<updated>2009-01-19T08:12:41Z</updated>

		<summary type="html">&lt;p&gt;DanteAllegria: /* iPhone/iPod Touch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article explains how to build a tool chain for iPhone OS 2.0. &lt;br /&gt;
&lt;br /&gt;
'''Please note that this section is under development.'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Mac OS X ==&lt;br /&gt;
Until a valid iPhone ARM toolchain installer can be legally distributed throughout the public (grr NDA), the alternative is simple. Install the Apple iPhone SDK, and use it's compiler, and specify the correct architecture, like so:&lt;br /&gt;
&lt;br /&gt;
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk&lt;br /&gt;
&lt;br /&gt;
For extra headers that you have either obtained from an external source, or dumped from the iphone or iphone simulator frameworks yourself, place them in a custom include directory and pass the -I option through the compiler like so:&lt;br /&gt;
&lt;br /&gt;
..../gcc -I &amp;quot;YOUR INCLUDE DIRECTORY&amp;quot;.......&lt;br /&gt;
&lt;br /&gt;
Use saurik's codesign tool (ldid) to sign the binary like so:&lt;br /&gt;
&lt;br /&gt;
ldid -S &amp;lt;binary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More on this coming soon.&lt;br /&gt;
&lt;br /&gt;
== Windows XP ==&lt;br /&gt;
&lt;br /&gt;
=== Extraction of iPhone OS 2.0 SDK ===&lt;br /&gt;
''Please Note: As of 7-Zip 4.59 Beta, support is available for .DMG and XAR-format archives. 7-Zip is now capable of completely extracting iPhone 2.0 SDK Package.''&lt;br /&gt;
* Download the iPhone OS 2.0 SDK from [http://developer.apple.com/iphone/index.action Apple iPhone Dev Center].&lt;br /&gt;
* Download and install ''HFSExplorer'' from [http://hem.bredband.net/catacombae/hfsx.html catacombae software].&lt;br /&gt;
* Start ''HFSExplorer'' and choose the menu ''File&amp;amp;rarr;Open UDIF Disk Image (.dmg)...''&lt;br /&gt;
* Select the iPhone 2.0 SDK disk image ''iphone_sdk_final.dmg'' and press ''Open''&lt;br /&gt;
* When the tool asks ''Which partition to read'' leave it at ''&amp;quot;Mac_OS_X&amp;quot; (Apple_HFS)'' and press ''OK''&lt;br /&gt;
* Go to ''Packages'' and select the package you want to extract, e.g. ''iPhoneSDKHeadersAndLibs.pkg'' for the iPhone OS 2.0 header files.&lt;br /&gt;
* With right mouse button choose ''Extract data'' to extract an installation package.&lt;br /&gt;
* Please note that in order to extract this .pkg file on Windows, you must compile xar using Cygwin.  Make sure you have libxml2, libxml2-devel, openssl and openssl-devel.  You can then follow the instructions below.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
Currently we can only describe how to get the headers from the iPhone OS 2.0 SDK.&lt;br /&gt;
&lt;br /&gt;
=== Extraction of iPhone OS 2.0 Installation Packages (.pkg) ===&lt;br /&gt;
* Extract &amp;lt;tt&amp;gt;iPhoneSDKHeadersAndLibs.pkg&amp;lt;/tt&amp;gt; from iPhone OS 2.0 SDK:&lt;br /&gt;
 mount -t hfs -o loop /path/to/iphone_sdk_final.dmg /somepath/somedir&lt;br /&gt;
:Copy &amp;lt;tt&amp;gt;iPhoneSDKHeadersAndLibs.pkg&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;/somepath/somedir&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Use the ''[http://code.google.com/p/xar/ eXtensible ARchiver]'' &amp;lt;tt&amp;gt;xar&amp;lt;/tt&amp;gt; to extract the file &amp;lt;tt&amp;gt;Payload&amp;lt;/tt&amp;gt; file containing the actual header files:&lt;br /&gt;
 xar -xf iPhoneSDKHeadersAndLibs.pkg Payload&lt;br /&gt;
*Extract the contents of the resulting &amp;lt;tt&amp;gt;Payload&amp;lt;/tt&amp;gt; file&lt;br /&gt;
 zcat Payload | cpio -id&lt;br /&gt;
or&lt;br /&gt;
 zcat Payload | cpio -id '*.h'&lt;br /&gt;
to extract only all header files included in the package.&lt;br /&gt;
&lt;br /&gt;
=== Framework Headers ===&lt;br /&gt;
This section assumes that&lt;br /&gt;
 zcat Payload | cpio -id '*.h'&lt;br /&gt;
got used in previous section.&lt;br /&gt;
&lt;br /&gt;
If you want to move all Framework headers into an ''include'' directory continue&lt;br /&gt;
as follows:&lt;br /&gt;
&lt;br /&gt;
* Remove the project XCode templates since they will not be required anymore:&lt;br /&gt;
 rm -rf Platforms/iPhoneOS.platform/Developer/Library&lt;br /&gt;
&lt;br /&gt;
* Create your target ''include'' directory:&lt;br /&gt;
 mkdir include&lt;br /&gt;
&lt;br /&gt;
* Get just the ''System'' and ''usr'' directories from the iPhone Os 2.0 SDK and remove the empty ''Platforms'' directory hierarchy:&lt;br /&gt;
 mv Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/* .&lt;br /&gt;
 rmdir -p Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/&lt;br /&gt;
&lt;br /&gt;
* Move the Framework headers to current directory and clean-up empty directory hierarchy:&lt;br /&gt;
 mv System/Library/Frameworks/* .&lt;br /&gt;
 rmdir -p System/Library/Frameworks/&lt;br /&gt;
&lt;br /&gt;
* Rename/move all Framework header directories into ''include'' directory and cleanup&lt;br /&gt;
 mv AddressBook.framework/Headers include/AddressBook&lt;br /&gt;
 mv AddressBookUI.framework/Headers include/AddressBookUI&lt;br /&gt;
 mv AudioToolbox.framework/Headers include/AudioToolbox&lt;br /&gt;
 mv AudioUnit.framework/Headers include/AudioUnit&lt;br /&gt;
 mv CFNetwork.framework/Headers include/CFNetwork&lt;br /&gt;
 mv CoreAudio.framework/Headers include/CoreAudio&lt;br /&gt;
 mv CoreFoundation.framework/Headers include/CoreFoundation&lt;br /&gt;
 mv CoreGraphics.framework/Headers include/CoreGraphics&lt;br /&gt;
 mv CoreLocation.framework/Headers include/CoreLocation&lt;br /&gt;
 mv Foundation.framework/Headers include/Foundation&lt;br /&gt;
 mv MediaPlayer.framework/Headers include/MediaPlayer&lt;br /&gt;
 mv OpenAL.framework/Headers include/OpenAL&lt;br /&gt;
 mv OpenGLES.framework/Headers include/OpenGLES&lt;br /&gt;
 mv QuartzCore.framework/Headers include/QuartzCore&lt;br /&gt;
 mv Security.framework/Headers include/Security&lt;br /&gt;
 mv SystemConfiguration.framework/Headers include/SystemConfiguration&lt;br /&gt;
 mv UIKit.framework/Headers include/UIKit&lt;br /&gt;
 rmdir -p *.framework&lt;br /&gt;
&lt;br /&gt;
* The above commands can also be simplified (and can be applied to other versions of SDKs, for example, iPhone SDK 2.2) using a bash shell command:&lt;br /&gt;
 for a in *.framework; do mv $a/Headers include/${a%.*}; done&lt;br /&gt;
 rmdir -p *.framework&lt;br /&gt;
&lt;br /&gt;
* The remaining directories are ''include'' with all Framework headers and ''usr'' with all system related headers.&lt;br /&gt;
&lt;br /&gt;
* Move the ''usr/include'' headers also into new ''include'' directory, remove ''usr/lib'' since gcc includes will not be needed (at least not on iPhone toolchain), and clean up:&lt;br /&gt;
 mv usr/include/* include/&lt;br /&gt;
 rm -rf usr/lib&lt;br /&gt;
 rmdir -p usr/include/&lt;br /&gt;
&lt;br /&gt;
* You may still remove the ''Payload'' file since we don't need it anymore:&lt;br /&gt;
 rm Payload&lt;br /&gt;
&lt;br /&gt;
* Create a tar file so that you can directly transfer to your iPhone:&lt;br /&gt;
 tar --group 0 --owner 0 -cvf include.tar include&lt;br /&gt;
&lt;br /&gt;
* You are done.&lt;br /&gt;
&lt;br /&gt;
* Now you may transfer the ''include.tar'' to your iPhone (as user root), login to your iPhone via ssh and execute following commands to extract the header files (on your iPhone):&lt;br /&gt;
 cd /var&lt;br /&gt;
 tar xf /private/var/root/include.tar&lt;br /&gt;
&lt;br /&gt;
== iPhone/iPod Touch ==&lt;br /&gt;
There is a tool chain available after jailbreak from the [[Cydia|Cydia installer]]. You just need to install&lt;br /&gt;
the '''GNU C Compiler''' from Cydia to get the development environment on your iPhone&lt;br /&gt;
or iPod Touch. BigBoss has some comments on this Toolchain on his&lt;br /&gt;
webpage ''[http://thebigboss.org/moreinfo/Toolchain2.php Toolchain 2.0]''.&lt;br /&gt;
&lt;br /&gt;
If you want to use the header files from iPhone OS 2.0, you can obtain them from the&lt;br /&gt;
iPhone OS 2.0 SDK as described in section ''[[#Framework Headers|Framework Headers]]''.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:'''&lt;br /&gt;
When using iphone-gcc ( the native compiler ) to compile iPhone applications, you must do one of the following:&lt;br /&gt;
# Patch the SDK header files for use with the compiler ( stupid thing doesn't like the new headers! ) or&lt;br /&gt;
# Use the old header files ( which are great, but some things dont work/exist the same anymore! ) or&lt;br /&gt;
# Use the following settings in your Makefile to avoid warnings and errors during compilation and linking:&lt;br /&gt;
 CC=/usr/bin/gcc&lt;br /&gt;
 &lt;br /&gt;
 CFLAGS=-fsigned-char -g -ObjC -fobjc-exceptions \&lt;br /&gt;
   -Wall -Wundeclared-selector -Wreturn-type -Wnested-externs \&lt;br /&gt;
   -Wredundant-decls \&lt;br /&gt;
   -Wbad-function-cast \&lt;br /&gt;
   -Wchar-subscripts \&lt;br /&gt;
   -Winline -Wswitch -Wshadow \&lt;br /&gt;
   -I/var/include \&lt;br /&gt;
   -I/var/include/gcc/darwin/4.0 \&lt;br /&gt;
   -D_CTYPE_H_ \&lt;br /&gt;
   -D_BSD_ARM_SETJMP_H \&lt;br /&gt;
   -D_UNISTD_H_&lt;br /&gt;
 &lt;br /&gt;
 CPPFLAGS=&lt;br /&gt;
 &lt;br /&gt;
 LD=$(CC)&lt;br /&gt;
 &lt;br /&gt;
 LDFLAGS=-lobjc \&lt;br /&gt;
   -F/System/Library/Frameworks \&lt;br /&gt;
   -framework CoreFoundation \&lt;br /&gt;
   -framework Foundation \&lt;br /&gt;
   -framework UIKit \&lt;br /&gt;
   -framework CoreGraphics \&lt;br /&gt;
   -L/usr/lib -lc /usr/lib/libgcc_s.1.dylib \&lt;br /&gt;
   -bind_at_load \&lt;br /&gt;
   -multiply_defined suppress&lt;br /&gt;
&lt;br /&gt;
If you want to test the iPhone 2.0 Toolchain, you may use this [[HelloWorld on iPhone|HelloWorld]] example.&lt;br /&gt;
&lt;br /&gt;
== Misc. Issues ==&lt;br /&gt;
&lt;br /&gt;
For the iPhone 2.2 SDK headers, you might encounter an error when compiling about missing the file, stdint.h. In that case, try this:&lt;br /&gt;
  cd /var/include&lt;br /&gt;
  ls stdint.h # make sure it doesn't exist&lt;br /&gt;
  ln -s gcc/darwin/4.0/stdint.h stdint.h&lt;/div&gt;</summary>
		<author><name>DanteAllegria</name></author>
		
	</entry>
</feed>