<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Code::Blocks Help</title>
		<link>http://www.allegro.cc/forums/view/606012</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 12 Jan 2011 06:51:18 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>EDIT::EDIT:: Ok, well now i ungot it</p><p>Okay I&#39;ve been trying to configure Allegro5 (rc4) to work with Code::Blocks for a good while now, I had given up for a while but have little to do this weekend so i thought id try to pick it up again.</p><p><b>What I want:</b><br />To be able to compile allegro5 programs with ease and comfort.</p><p><b>What is happening:</b><br />Limited to no success.</p><p><b>What I&#39;ve Done:</b><br />Downloaded the correct binaries for my compiler Mingw4.4.0 (4.4.1?).<br />Placed the big folder (allegro-5.0.0-rc4-mingw-4.4.0) in my Mingw folder (C:\Program Files\CodeBlocks\MinGW)<br />Followed these steps:<br />.     Go to Settings / Compiler and Debugger / Global compiler settings <br />.     Go to Search Directories tab <br />.     Under Compiler, add c:\allegro\include <br />.     Under Linker, add c:\allegro\lib <br />.     Go to Toolchain Executables tabs <br />.     Under Additional Paths, add c:\allegro\bin //dont worry i used its actual folder not the imaginary one in my root.</p><p>gone to project&gt;&gt;build options&gt;&gt;linker settings&gt;&gt; add&gt;&gt; allegro-5.0.0-rc4-mingw-4.4.0\lib\liballegro-5.0.0-RC4-monolith-mt.a</p><p><b>Code I tried to compile:</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><span class="p">#define ALLEGRO_STATICLINK 1</span>
<span class="number">  2</span><span class="p">#include &lt;allegro5/allegro.h&gt;</span>
<span class="number">  3</span>
<span class="number">  4</span><span class="k1">int</span> main<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="number">  5</span><span class="k2">{</span>
<span class="number">  6</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="k2">;</span>
<span class="number">  7</span>
<span class="number">  8</span>    <a href="http://www.allegro.cc/manual/ALLEGRO_DISPLAY"><span class="a">ALLEGRO_DISPLAY</span></a> <span class="k3">*</span>display <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_display"><span class="a">al_create_display</span></a><span class="k2">(</span><span class="n">640</span>, <span class="n">480</span><span class="k2">)</span><span class="k2">;</span>
<span class="number">  9</span>
<span class="number"> 10</span>    <a href="http://www.allegro.cc/manual/al_clear_to_color"><span class="a">al_clear_to_color</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/al_map_rgb"><span class="a">al_map_rgb</span></a><span class="k2">(</span><span class="n">0</span>, <span class="n">150</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 11</span>
<span class="number"> 12</span>    <a href="http://www.allegro.cc/manual/al_flip_display"><span class="a">al_flip_display</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 13</span>
<span class="number"> 14</span>    <a href="http://www.allegro.cc/manual/al_rest"><span class="a">al_rest</span></a><span class="k2">(</span><span class="n">5</span><span class="k2">)</span><span class="k2">;</span>
<span class="number"> 15</span>
<span class="number"> 16</span>    <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="number"> 17</span><span class="k2">}</span>
<span class="number"> 18</span><a href="http://www.allegro.cc/manual/END_OF_MAIN"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span>
</div></div><p>
and it gave me the following errors:<br />main.cpp||In function &#39;int main()&#39;:|<br />main.cpp|8|warning: unused variable &#39;display&#39;|<br />main.cpp|18|error: expected constructor, destructor, or type conversion at end of input|</p><p><b>What I think I need to do:</b><br />Play around and link some magic things to some other things.</p><p><b>Additional Information:</b><br />OS: Windows Vista (ugh)<br />CB version: svn 6900</p><p><b>Question:</b><br />What settings do I need to change specifically? please. <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" /></p><p>Thank You for your time, <i>I know this issue has been addressed multiple times.</i> <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Fworg64)</author>
		<pubDate>Sun, 09 Jan 2011 04:13:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>1 - Paste the Binaries into Mingw Directory, Not just the allegro-5.0.0-rc4-mingw-4.4.0 folder, but what it is inside... It should ask you if you want to merge some folders or something like that and you must say yes.</p><p>2 - Download &quot;dx9mgw.zip&quot; located at:<br /><a href="http://trent.gamblin.ca/dx/dx9mgw.zip">http://trent.gamblin.ca/dx/dx9mgw.zip</a><br />and paste it in the Mingw Directory. It also should ask you to merge some folder, say yes..</p><p>3 - Add this Environment Variable to the &quot;path&quot; system variable: C:\codeblocks\mingw\bin; (attention with the semi-colon, must be there)</p><p>4 - Make a new Environment Variable, a System Variable, named MINGDIR, and give it the value: C:\codeblocks\mingw.</p><p>To do so... Go to: Start &gt; Control Panel &gt; Advanced System Settings &gt; Advanced &gt; Environment Variables.</p><p><span class="remote-thumbnail"><span class="json">{"name":"variable.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/4\/f4c7fd3199990805a5aee5f8247cb797.gif","w":1180,"h":712,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/4\/f4c7fd3199990805a5aee5f8247cb797"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/f/4/f4c7fd3199990805a5aee5f8247cb797-240.jpg" alt="variable.gif" width="240" height="144" /></span></p><p>The image is just a reference... Do what I said above: use C:\codeblocks\mingw\bin; and C:\codeblocks\mingw. instead of C:\Mingw\bin and C:\Mingw</p><p>5 - Run the Code::Blocks program.<br />-Click Settings-&gt;Compiler And Debugger-&gt;Toolchain executables. Click Auto-Detect for the compilers installation directory.<br />A message should appear saying, (Auto-detected installation path of &quot;GNU GCC Compiler&quot; in &quot;C:\codeblocks\mingw&quot;). Click OK. Click OK again.</p><p>6 - Create new Project</p><p>7 - Empty project</p><p>8 - <span class="remote-thumbnail"><span class="json">{"name":"empty.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/a\/0a90ce97fb7d81546915087e980491f6.gif","w":630,"h":530,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/a\/0a90ce97fb7d81546915087e980491f6"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/0/a/0a90ce97fb7d81546915087e980491f6-240.jpg" alt="empty.gif" width="240" height="201" /></span></p><p>9 - File &gt; New &gt; Empty File &gt; Yes &gt; Save &gt; OK... </p><p>10 - Settings &gt; Compile And Debugger &gt; Linker Settings </p><p>And link there all the Allegro Dlls... </p><p><span class="remote-thumbnail"><span class="json">{"name":"lol.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e9191937e7d8f6d81b4f6caafface395.gif","w":1920,"h":1080,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e9191937e7d8f6d81b4f6caafface395"}</span><img src="http://www.allegro.cc//djungxnpq2nug.cloudfront.net/image/cache/e/9/e9191937e7d8f6d81b4f6caafface395-240.jpg" alt="lol.gif" width="240" height="135" /></span></p><p>That&#39;s it... </p><p>The next step is to create Crysis 5... <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Wed, 12 Jan 2011 06:37:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title"><a href="http://www.allegro.cc/forums/thread/606012/897738#target">Fworg64</a> said:</div><div class="quote"><p>

and it gave me the following errors:<br />main.cpp||In function &#39;int main()&#39;:|<br />main.cpp|8|warning: unused variable &#39;display&#39;|<br />main.cpp|18|error: expected constructor, destructor, or type conversion at end of input|
</p></div></div><p>
The error on line 18 is because you used END_OF_MAIN(), don&#39;t use end of main with Allegro 5, it&#39;s only for Allegro 4.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Wed, 12 Jan 2011 06:51:18 +0000</pubDate>
	</item>
</rss>
