<?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>boyfarrell.com &#187; Tutorials</title>
	<atom:link href="http://www.boyfarrell.com/category/tutorials/feed" rel="self" type="application/rss+xml" />
	<link>http://www.boyfarrell.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 10 Aug 2009 22:52:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Making XCode Templates for GNU Scientific Library</title>
		<link>http://www.boyfarrell.com/tutorials/making-xcode-templates-for-gnu-scientific-library</link>
		<comments>http://www.boyfarrell.com/tutorials/making-xcode-templates-for-gnu-scientific-library#comments</comments>
		<pubDate>Wed, 03 Sep 2008 15:43:51 +0000</pubDate>
		<dc:creator>boyfarrell</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.boyfarrell.com/?p=105</guid>
		<description><![CDATA[In the last post about Xcode and GNU Scientific Library (GSL), we went through all the steps (search paths and linking) to get xcode to use the GSL library. This is unfortunately a tedious process! So to help you out I made a skeleton project that had all the correct information. However, if you used [...]]]></description>
			<content:encoded><![CDATA[<p>In the last post about <a href=""http://www.boyfarrell.com/learning-curve/gnu-scientific-library-and-xcode-31>Xcode and GNU Scientific Library (GSL)</a>, we went through all the steps (search paths and linking) to get xcode to use the GSL library. This is unfortunately a tedious process! So to help you out I made a skeleton project that had all the correct information. However, if you used this project as the starting point for your own coding you would have been stuck with the default name that I decided. This is particular annoying because if you cut and paste this project all the time so you don&#8217;t have to keep linking and adding search paths (like I do) they <strong>all</strong> get the same name in the XCode file menu and also in spotlight! i.e. search &#8216;kind:xcode&#8217; to see what I mean. </p>
<h5>The third way: Xcode templates</h5>
<p>When creating an XCode project there are various templates which you use as the basis of you project. For example, if you are doing a command line application but want to you Cocoa foundation classes (NSArray and NSString etc) then you would pick the &#8216;Command Line Utility -> Foundation Tool&#8217; template. Here we will make a &#8216;Cocoa Application + GNU Scientific Library&#8217; template, thus solving all the tedium, redundant spotlight searches and cluttered &#8216;Open Recent File&#8217; menu.</p>
<ul>
<li><del datetime="2009-01-16T14:32:33+00:00"><a href="http://hogbaysoftware.com/products/xcodetemplatefactory/">Download Hogbay Software&#8217;s XCode Template Factory</a></del></li>
<li><a href="http://www.boyfarrell.com/files/XcodeTemplateFactory.zip">Download Hogbay Software&#8217;s XCode Template Factory (boyfarrell.com link)</a></li>
<li><a href="http://www.boyfarrell.com/learning-curve/gnu-scientific-library-and-xcode-31">Download my GNU Scientific Library XCode project</a>. Or follow the instructions there and make you own project (this is probably a better idea because the comments section has many helpful instructions on how to fix any problems that my arise).</a></li>
</ul>
<p>Assuming that you have extracted the <a href="http://www.tvsquad.com/2006/09/08/star-trek-the-next-generation-the-naked-now/">fully functional</a> (Ahh&#8230; Natasha Yar, how I miss you late 80s hair styles) XCode project to the Desktop, this screen shot shows you all that needs to be done&#8230;</p>
<p><a href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/09/xtf.png"><img src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/09/xtf-300x192.png" alt="" title="xtf" width="300" height="192" class="aligncenter size-medium wp-image-115" /></a></p>
<blockquote><p>Thank you Hogbay Software!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.boyfarrell.com/tutorials/making-xcode-templates-for-gnu-scientific-library/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>GNU Scientific Library and XCode 3.1</title>
		<link>http://www.boyfarrell.com/learning-curve/gnu-scientific-library-and-xcode-31</link>
		<comments>http://www.boyfarrell.com/learning-curve/gnu-scientific-library-and-xcode-31#comments</comments>
		<pubDate>Fri, 04 Apr 2008 15:30:22 +0000</pubDate>
		<dc:creator>boyfarrell</dc:creator>
				<category><![CDATA[Learning Curve]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.boyfarrell.com/uncategorised/gnu-scientific-library-and-xcode-31</guid>
		<description><![CDATA[Update notice: 8th September 2008 This post has become quite popular with those using Xcode and GSL, so you might be interested in this other post, Making XCode Templates for GNU Scientific Library. Once you have a functioning project (once you have done this tutorial) that post will tell you how to add it to [...]]]></description>
			<content:encoded><![CDATA[<div class="notice">Update notice: 8th September 2008<br />
This post has become quite popular with those using Xcode and GSL, so you might be interested in this other post, <a href="http://www.boyfarrell.com/tutorials/making-xcode-templates-for-gnu-scientific-library">Making XCode Templates for GNU Scientific Library</a>. Once you have a functioning project (once you have done this tutorial) that post will tell you how to add it to the XCode template list. E.g. In the future you only ever have to select &#8216;Cocoa Application + GSL&#8217; when you want a GSL based project.</div>
<p>Assuming you have a working installation of GNU Scientific Library either from source, Fink or MacPorts, this tutorial will show you how to getting a working XCode project. I am currently using XCode 3.1 but this process hasn&#8217;t changed much over the last few years, so will work on older systems.</p>
<p>Download a GSL Example project ready for your own code:<br />
<a href="http://www.boyfarrell.com/files/GSL-Project-Xcode-3.0.zip"> XCode 3.0+ GSL Example Project</a><br />
<a href="http://www.boyfarrell.com/files/GSL-Project-Xcode-2.4.zip"> XCode 2.4+ GSL Example Project</a></p>
<ol>
<li>
Create a new project, I called mine, &#8216;GSL Project&#8217;.<br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-1.png" title="Create project"><img id="image86" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-1.thumbnail.png" alt="Create project" /></a></p>
</li>
<li> Choose a default template, New Cocoa application will do nicely.<br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-2.png" title="Template"><img id="image87" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-2.thumbnail.png" alt="Template" /></a></p>
</li>
<li>
Select get info on the project icon. As we need to tell xcode where GSL is.<br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-4.png" title="Get info"><img id="image88" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-4.thumbnail.png" alt="Get info" /></a></p>
</li>
<li> Select the native option in the architectures list. Xcode can build dual binaries (DBs), however, GSL is only compiled for the native machine, so otherwise <del datetime="2009-08-10T22:50:09+00:00">it it tried to make a DB is</del> this step will FAIL!<br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-5.png" title="native"><img id="image89" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-5.thumbnail.png" alt="native" /></a></p>
</li>
<li> Type header search paths into the search box. Editing the &#8216;Header Search Paths&#8217; field, add the following paths.
<p><a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-6.png" title="hsp"><img id="image90" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-6.thumbnail.png" alt="hsp" /></a><br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-7.png" title="hsp fields"><img id="image91" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-7.thumbnail.png" alt="hsp fields" /></a></p>
</li>
<li> Next we will do the same process as but for the &#8216;Library search paths&#8217;,
<p><a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-8.png" title="lsp"><img id="image92" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-8.thumbnail.png" alt="lsp" /></a><a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-9.png" title="lsp fields"><img id="image93" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-9.thumbnail.png" alt="lsp fields" /></a></p>
</li>
<li> Now search for &#8216;other linker flags&#8217; and set the following values,<br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-11.png" title="olf"><img id="image94" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-11.thumbnail.png" alt="olf" /></a><br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-12.png" title="olf field"><img id="image95" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-12.thumbnail.png" alt="olf field" /></a></p>
</li>
<li> We are done, but let&#8217;s do a test program. Select the main.m file in the File &#038; Groups list. You may need to press the &#8216;Editor&#8217; button in the button menu to see the contents of the file,<br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-13.png" title="main.m cocoa"><img id="image96" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-13.thumbnail.png" alt="main.m cocoa" /></a> </p>
</li>
<li>
Try this test code (<a href="http://www.network-theory.co.uk/docs/gslref/Exampleprogramsforvectors.html">slightly modified from the code here</a>):<br />
<script src='http://pastie.org/381201.js'></script><br />
Build and run.<br />
<a class="imagelink" href="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-15.png" title="main.m gsl"><img id="image97" src="http://www.boyfarrell.com/wordpress/wp-content/uploads/2008/04/picture-15.thumbnail.png" alt="main.m gsl" /></a></p>
</li>
</ol>
<p>Make sure that you have the DEBUG build settings active. Have your project in RELEASE mode  won&#8217;t work (thanks for point that out Paul).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.boyfarrell.com/learning-curve/gnu-scientific-library-and-xcode-31/feed</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
	</channel>
</rss>
