<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>crunchlife: Compiling the Gosu Game Development Library on Ubuntu Feisty</title>
    <link>http://crunchlife.com/articles/2007/11/20/compiling-the-gosu-game-development-library-on-ubuntu-feisty</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Compiling the Gosu Game Development Library on Ubuntu Feisty</title>
      <description>&lt;p&gt;I&amp;#8217;ve had the itch this week to try out a few of Ruby&amp;#8217;s game development libraries.  I decided to start with &lt;a href="http://code.google.com/p/gosu/" target="_blank"&gt;Gosu&lt;/a&gt;.  Gosu is a 2D game development library for the Ruby and C++ programming languages.  It&amp;#8217;s available for the Mac OS X, Windows, and Linux platforms and integrates with both the &lt;a href="http://rmagick.rubyforge.org/" target="_blank"&gt;RMagick&lt;/a&gt; image processing library and the &lt;a href="http://wiki.slembcke.net/main/published/Chipmunk" target="_blank"&gt;Chipmunk&lt;/a&gt; physics library.&lt;/p&gt;

&lt;p&gt;Unfortunately the library is only available as a gem for Mac OS X and Windows.  As a Linux user I&amp;#8217;ve become accustom to compiling my own libraries, but this often means downloading and compiling dependencies, swearing, and a lot of Googling.  I was lucky.  Compiling Gosu only caused a few hairs to fall out.&lt;/p&gt;

&lt;p&gt;If you&amp;#8217;re an Ubuntu Feisty user, you&amp;#8217;ll need to add the following line to the LargeImageData.hpp file located in the gosu-source-0.7.7/Gosulmpl/Graphics directory:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;#include &amp;lt;boost/none.hpp&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This line adds a reference needed on line 31 of the LargeImageData class.  With this addition, you can then execute the commands below from the gosu-source-0.7.7/linux directory to compile the Gosu game development library.&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ autoconf
$ ./configure
$ make&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The make file provided with the source does not add the compiled gosu.so file to the Ruby lib directory.  I chose to do this manually rather than edit the make file.  Just issue the following command from the gosu-source-0.7.7/linux directory to add your newly compiled library.&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;$ sudo cp gosu.so /usr/lib/ruby/1.8/i486-linux/gosu.so&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With a little elbow grease I successfully compiled the &lt;a href="http://code.google.com/p/gosu/" target="_blank"&gt;Gosu&lt;/a&gt; game development library on Ubuntu Feisty.  I&amp;#8217;ll dig into some tutorials next and post back with my results.&lt;/p&gt;

&lt;p&gt;Be sure to check out Gosu&amp;#8217;s, &lt;a href="http://code.google.com/p/gosu/wiki/GettingStartedOnLinux" target="_blank"&gt;Getting Started on Linux&lt;/a&gt;, for a list of dependencies and compilation instructions.&lt;/p&gt;</description>
      <pubDate>Tue, 20 Nov 2007 17:40:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:aa8da804-fb55-4b36-9a9a-50f001b259af</guid>
      <author>Ryan Baxter</author>
      <link>http://crunchlife.com/articles/2007/11/20/compiling-the-gosu-game-development-library-on-ubuntu-feisty</link>
      <category>Ruby</category>
      <category>Ubuntu</category>
    </item>
    <item>
      <title>"Compiling the Gosu Game Development Library on Ubuntu Feisty" by Ryan Baxter</title>
      <description>Julian has committed this fix!</description>
      <pubDate>Tue, 04 Dec 2007 08:39:05 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:ef209a61-d020-4d80-83a1-8595a2a71d01</guid>
      <link>http://crunchlife.com/articles/2007/11/20/compiling-the-gosu-game-development-library-on-ubuntu-feisty#comment-884</link>
    </item>
  </channel>
</rss>
