<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Errors compiling in Visual Studio 2013</title>
		<link>http://www.allegro.cc/forums/view/614655</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 17 Sep 2014 21:14:52 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello all,</p><p>I have switched from Visual Studio 2008 to Visual Studio 2013.  I have two different Allegro projects saved.  One of them opens and compiles without issue, the other does not.  The one that doesn&#39;t compile gives me the following:</p><p>Error	1	error C2632: &#39;char&#39; followed by &#39;bool&#39; is illegal	c:\allegro5\include\allegro5\platform\astdbool.h	26	1	mm<br />Warning	2	warning C4091: &#39;typedef &#39; : ignored on left of &#39;unsigned char&#39; when no variable is declared	c:\allegro5\include\allegro5\platform\astdbool.h	26	1	mm</p><p>The section of code that the compiler is erroring out on is from astdbool.h:</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">#ifndef __al_included_allegro5_astdbool_h</span>
<span class="number">  2</span><span class="p">#define __al_included_allegro5_astdbool_h</span>
<span class="number">  3</span>
<span class="number">  4</span><span class="p">#ifndef __cplusplus</span>
<span class="number">  5</span><span class="p">#  ifdef ALLEGRO_HAVE_STDBOOL_H</span>
<span class="number">  6</span><span class="p">#     include &lt;stdbool.h&gt;</span>
<span class="number">  7</span><span class="p">#  else</span>
<span class="number">  8</span><span class="p">#     ifndef ALLEGRO_HAVE__BOOL</span>
<span class="number">  9</span>         <span class="k1">typedef</span> <span class="k1">unsigned</span> <span class="k1">char</span> _Bool<span class="k2">;</span> <span class="c">// this is the line the errors reference</span>
<span class="number"> 10</span><span class="p">#     endif</span>
<span class="number"> 11</span><span class="p">#     define bool _Bool</span>
<span class="number"> 12</span><span class="p">#     define false 0</span>
<span class="number"> 13</span><span class="p">#     define true 1</span>
<span class="number"> 14</span><span class="p">#     define __bool_true_false_are_defined 1</span>
<span class="number"> 15</span><span class="p">#  endif</span>
<span class="number"> 16</span><span class="p">#endif</span>
<span class="number"> 17</span>
<span class="number"> 18</span><span class="p">#endif</span>
</div></div><p>

Has anyone encountered this before?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (V T)</author>
		<pubDate>Tue, 16 Sep 2014 07:16:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I had the same.</p><p>It&#39;s because (I think) VC13 has stdbool.h and older versions don&#39;t.<br />I fixed it by editing include/allegro5/platform/alplatf.h and changing the line 
</p><div class="source-code snippet"><div class="inner"><pre><span class="c">/* #undef ALLEGRO_HAVE_STDBOOL_H */</span>
</pre></div></div><p>
to 
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define ALLEGRO_HAVE_STDBOOL_H </span>
</pre></div></div><p>

If you&#39;re compiling from source I think you can edit alplatf.h.cmake - not sure about that.</p><p>Pete
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Tue, 16 Sep 2014 17:31:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Peter,</p><p>Thank you sir, that fixed it!</p><p>VT
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (V T)</author>
		<pubDate>Wed, 17 Sep 2014 21:14:52 +0000</pubDate>
	</item>
</rss>
