<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Trying A5 on MacOS without Xcode</title>
		<link>http://www.allegro.cc/forums/view/606396</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 19 Feb 2011 05:37:17 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello,</p><p>I&#39;m learning C++ and trying out some game libraries, so I decided to give Allegro a spin.</p><p>I&#39;ve copied the example from <a href="http://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Displays">http://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Displays</a> into a file and am trying to compile it with:</p><p>g++ main.cpp -o main -Wall -L/usr/local/include -L/usr/local/lib -lallegro_main -lallegro</p><p>(I have a makefile etc but this is what I&#39;ve narrowed it down to.)</p><p>This compiles without errors, but when I run the executable I get:</p><p>dyld: Symbol not found: __al_mangled_main<br />  Referenced from: /usr/local/lib/liballegro_main.5.0.dylib<br />  Expected in: flat namespace<br /> in /usr/local/lib/liballegro_main.5.0.dylib<br />Trace/BPT trap</p><p>What am I doing wrong? The necessary files should be present:</p><p>$ ls /usr/local/lib/liballegro.*<br />/usr/local/lib/liballegro.5.0.0.dylib<br />/usr/local/lib/liballegro.5.0.dylib<br />/usr/local/lib/liballegro.dylib</p><p>$ ls /usr/local/lib/liballegro_main.*<br />/usr/local/lib/liballegro_main.5.0.0.dylib	<br />/usr/local/lib/liballegro_main.5.0.dylib<br />/usr/local/lib/liballegro_main.dylib
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (nonpro)</author>
		<pubDate>Sun, 13 Feb 2011 22:30:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>For C++, your <span class="source-code">main<span class="k2">(</span><span class="k2">)</span></span> function <i>must</i> be<br /><span class="source-code"><span class="k1">int</span> main<span class="k2">(</span><span class="k1">int</span> argc, <span class="k1">char</span> <span class="k3">*</span><span class="k3">*</span>argv<span class="k2">)</span></span><br />In particular,<br /><span class="source-code"><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span></span><br />will <i>not</i> work. This has to do with Allegro&#39;s name manging.</p><p>(EDIT: Ok, I see that the tutorial has this. Make sure you do too).</p><p>As an aside, you should set up and use pkg-config rather than passing the library flags to the compiler directly.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Mon, 14 Feb 2011 01:48:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Check this:</p><p><a href="http://www.allegro.cc/manual/5/al_run_main">http://www.allegro.cc/manual/5/al_run_main</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (azerty_damned)</author>
		<pubDate>Sat, 19 Feb 2011 05:37:17 +0000</pubDate>
	</item>
</rss>
