<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Theorian &#187; Software Development</title>
	<atom:link href="http://theorian.com/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://theorian.com</link>
	<description>Technological Fusion</description>
	<lastBuildDate>Tue, 01 Nov 2011 05:20:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to compile freetype2 for the iPhone</title>
		<link>http://theorian.com/2009/08/how-to-compile-freetype2-for-the-iphone/</link>
		<comments>http://theorian.com/2009/08/how-to-compile-freetype2-for-the-iphone/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 22:32:18 +0000</pubDate>
		<dc:creator>Theorian</dc:creator>
				<category><![CDATA[Company Updates]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://theorian.com/?p=102</guid>
		<description><![CDATA[This is a quick howto which will help you compile freetype2 for you to use in your iPhone/iTouch app or game. But first you should know that you can find the freetype2 libraries pre-compiled for the iPhone and iPhone simulators within in <a href="http://www.openframeworks.cc/download"> these openFramework zips</a>]]></description>
			<content:encoded><![CDATA[<p>This is a quick howto which will help you compile freetype2 for you to use in your iPhone/iTouch app or game. But first you should know that you can find the freetype2 libraries pre-compiled for the iPhone and iPhone simulators within in <a href="http://www.openframeworks.cc/download"> these openFramework zips</a>. We use this in our iPhone game <a href="http://nanomechs.theorian.com">NanoMechs</a></p>
<p>But if you&#8217;d still like to compile your own, we want to get the latest freetype src:</p>
<p>[code]<br />
curl -O http://mirror.its.uidaho.edu/pub/savannah/freetype/freetype-2.3.9.tar.bz2<br />
[/code]</p>
<p>Next go ahead and unzip, you could always leave the archive there just in case:</p>
<p>[code]<br />
tar -jxvf freetype-2.3.9.tar.bz2<br />
[/code]</p>
<p>Now use your favorite text editor and jump into include/freetype/config/ftconfig.h and . then find and change the “asm” to “__asm__” in each file. You can do this in nano:</p>
<p>[code]<br />
nano freetype-2.3.9/include/freetype/config/ftconfig.h<br />
nano freetype-2.3.9/builds/unix/ftconfig.in<br />
[/code]</p>
<p>Press CTRL-W  type &#8216;asm&#8217; and press  ENTER<br />
wrap &#8216;asm&#8217; with 2 underscores on both sides so it looks like this:</p>
<p>[code]<br />
__asm__<br />
[/code]</p>
<p>Press CTRL-X  press &#8216;y&#8217; for yes then press ENTER to save the file.<br />
Jump into the freetype directory:</p>
<p>[code]<br />
cd freetype-2.3.9<br />
[/code]</p>
<p>Run this configure command:</p>
<p>[code]<br />
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 CFLAGS="-arch armv6 -pipe -mdynamic-no-pic -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -fmessage-length=0 -fvisibility=hidden -miphoneos-version-min=2.0 -gdwarf-2 -mthumb -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/libxml2 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk" CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar LDFLAGS="-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -Wl,-dead_strip -miphoneos-version-min=2.0"<br />
[/code]</p>
<p>Then just run make</p>
<p>[code]<br />
make<br />
[/code]</p>
<p>Your new library for the iPhone device will be in:</p>
<p>[code]<br />
freetype-2.3.9/objs/.libs/<br />
[/code]</p>
<p>note: This is not for the simulator and you will still need to get this into Xcode I&#8217;ll post more on this later or update this post.</p>
<p>Here are some related and essential websites on how to compile libraries for the iPhone: <a href="http://robertcarlsen.net/2009/03/25/openframeworks-iphone-libs-593">Robert Carlsen Compiling Libraries</a>, <a href="http://robertcarlsen.net/2009/07/15/cross-compiling-for-iphone-dev-884">Robert Carlsen Cross-Compiling</a> and <a href="http://latenitesoft.blogspot.com/2008/10/iphone-programming-tips-building-unix.html">LateNightSoft Programming Tips</a></p>
]]></content:encoded>
			<wfw:commentRss>http://theorian.com/2009/08/how-to-compile-freetype2-for-the-iphone/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

