<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Setup Allegro5 on Visual Studio Code on Mac</title>
		<link>http://www.allegro.cc/forums/view/617042</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 19 Sep 2017 18:57:55 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I was going to try out Visual Studio Code on Mac.  I haven&#39;t really used it before...nor have I really used Allegro 5.  It&#39;d be fun to try these things out for the upcoming TINS competition in October.  Of course, I wouldn&#39;t want to spend time during the competition learning how to use these things. <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" /> </p><p>Has anyone done this before?  I did a search on the site and the googles, but didn&#39;t find anything, albeit only after about 5 minutes of searching.  </p><p>Thoughts on a starting place?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Thu, 14 Sep 2017 03:23:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I really have no clue what I&#39;m talking about, but it should be as simple as installing Visual Studio code and the Allegro 5 Nuget package.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Thu, 14 Sep 2017 05:31:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Probably not Nuget, as that&#39;s Windows-only at the moment. I guess you just install Allegro via <a href="https://wiki.allegro.cc/index.php?title=Installing_with_homebrew">homebrew</a> and then do the usual linker options thing?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Thu, 14 Sep 2017 06:10:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>xD I told you I didn&#39;t know what I was talking about <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Thu, 14 Sep 2017 06:19:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m a bit stuck.  VS Code takes some grunt work to get it going, but I finally got it to compile allegro 5 code, yay!  Unfortunately, when I run it, al_init is returning a 1.  Searching the forums, this seems to be a symptom of having different versions of allegro between compilation and headers (or something like that).  </p><p>I went to /usr/local/lib and moved files with &quot;5.2.2&quot; and &quot;5.2&quot; off to other folders (in case I need to move them back).  Still no luck.  Thoughts?</p><p>Not sure if it will help, but here&#39;s my code and how I&#39;m compiling it.</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number">  1</span><span class="p">#define ALLEGRO_NO_MAGIC_MAIN</span>
<span class="number">  2</span><span class="p">#include &lt;allegro5/allegro.h&gt;</span>
<span class="number">  3</span><span class="p">#include &lt;iostream&gt;</span>
<span class="number">  4</span><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span>
<span class="number">  5</span>
<span class="number">  6</span><span class="k1">int</span> real_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 class="k2">{</span>
<span class="number">  7</span>    <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_init"><span class="a">al_init</span></a><span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> <span class="n">0</span><span class="k2">)</span> <span class="k2">{</span>
<span class="number">  8</span>        <span class="k1">return</span> <span class="n">1</span><span class="k2">;</span>        
<span class="number">  9</span>    <span class="k2">}</span>
<span class="number"> 10</span>    
<span class="number"> 11</span>    cout <span class="k3">&lt;</span><span class="k3">&lt;</span> <span class="s">"Hello world!"</span> <span class="k3">&lt;</span><span class="k3">&lt;</span> endl<span class="k2">;</span>
<span class="number"> 12</span>    
<span class="number"> 13</span>    <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 14</span><span class="k2">}</span>
<span class="number"> 15</span>
<span class="number"> 16</span><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 class="k2">{</span>
<span class="number"> 17</span>    <span class="k1">return</span> <a href="http://www.allegro.cc/manual/al_run_main"><span class="a">al_run_main</span></a><span class="k2">(</span>argc, argv, real_main<span class="k2">)</span><span class="k2">;</span>
<span class="number"> 18</span><span class="k2">}</span>
</div></div><p>

<b>Compile flags</b>
</p><div class="source-code"><div class="toolbar"><span class="button numbers"><b>#</b></span><span class="button select">Select</span><span class="button expand">Expand</span></div><div class="inner"><span class="number"> 1</span>g<span class="k3">+</span><span class="k3">+</span> <span class="k3">-</span>g helloworld.cpp <span class="k3">-</span>Wall <span class="k3">-</span>ansi <span class="k3">-</span>o test20.exe <span class="k3">-</span>L<span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>lib<span class="k3">/</span> <span class="k3">-</span>I<span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>include<span class="k3">/</span> <span class="k3">-</span>lallegro
</div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Mon, 18 Sep 2017 09:06:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>lolz, you know when you&#39;re an old A4 programmer when you expect it to return 0 on success <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />.</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_init"><span class="a">al_init</span></a></span> returns a boolean, true when everything worked, false when there was an error.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SiegeLord)</author>
		<pubDate>Mon, 18 Sep 2017 09:14:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Heh, it didn&#39;t even occur to me that the problem was in the code considering how much time I spent making VS Code do my bidding.  Made the code change and it worked!  </p><p>FYI, is it just me or is every tutorial on this page running into an Internal Error?  <a href="https://wiki.allegro.cc/index.php?title=Allegro_5_API_Tutorials">https://wiki.allegro.cc/index.php?title=Allegro_5_API_Tutorials</a>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Onewing)</author>
		<pubDate>Tue, 19 Sep 2017 08:10:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, I get the errors too
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Tue, 19 Sep 2017 18:57:55 +0000</pubDate>
	</item>
</rss>
