<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Allegro 4 for Linux and OSX</title>
		<link>http://www.allegro.cc/forums/view/617855</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 05 Jun 2019 18:59:40 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello people!</p><p>About a year ago I released my first Allegro game (well, really a remake of an old game), Alley Cat Remeow Edition: <a href="https://gamejolt.com/games/alleycatremeow/327439">https://gamejolt.com/games/alleycatremeow/327439</a></p><p>The game works on windows and I consider it a finished project, but some people have been asking me if I would release a version for Mac or Linux. While it was my intention in the beginning, I never got the opportunity of having my programing enviorment working on either of those systems, so I was never able to compile it for those systems.</p><p>So, I just wanted to ask: does anyone know how to compile programs for Allegro 4 on those systems, or may want to help me do so?</p><p>That would be greatly appreciated, thanks! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Cisco Mir)</author>
		<pubDate>Wed, 05 Jun 2019 16:48:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I don&#39;t own any OSX machines, so I can&#39;t help you there, but Linux is a fairly simple straightforward matter.</p><p>On Ubuntu, it&#39;s pretty easy.</p><pre>
sudo apt-get install liballegro4-dev
</pre><p>

Then to compile and link with allegro 4, you use allegro-config. Type it at a prompt to see options.</p><pre>
g++ -Wall -Wextra -Wshadow -g -o main.out `allegro-config --cflags` main.cpp `allegro-config --libs`
</pre><p>

EDIT<br />On versions of Linux that don&#39;t have packages prepared for allegro (they should all have one for Allegro 4 by now...), you can build from source using cmake.</p><p>Homebrew might have binaries for Allegro 4 on OSX.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 05 Jun 2019 17:34:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for that fast answer! I have not much idea of linux either osx, but that is a beginning, I will try what you said!</p><p>Is there any way of compiling it so I can include the binary executable and all the needed libs in the same folder, so the user doesn&#39;t need anything appart from what he downloaded? I was aiming to be able to release only one same zip file that works on all systems, with different executables.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Cisco Mir)</author>
		<pubDate>Wed, 05 Jun 2019 18:26:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>yes, static link.</p><p>On Windows this is no problem, but on Linux, even if you static link, you&#39;ll still have a bunch of dependencies on system libraries. Use ldd to list them, and then copy them into your game folder. Then write a launcher script that adds this library directory to your LD_LIBRARY_PATH environment variable.</p><pre>
g++ -Wall -g -o main.out `allegro-config --static --cflags` main.cpp `allegro-config --static --libs`
</pre><p>

</p><pre>
export LD_LIBRARY_PATH=libdir/:$LD_LIBRARY_PATH
</pre><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 05 Jun 2019 18:46:05 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thank you very much! I will give it a try! <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Cisco Mir)</author>
		<pubDate>Wed, 05 Jun 2019 18:50:31 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Even if you do static link, you should still distribute a single zip file for each OS you use. There&#39;s no point for me to download an OSX binary, for example.</p><p>Bump for progress and possible questions. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 05 Jun 2019 18:59:40 +0000</pubDate>
	</item>
</rss>
