<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Installing allegro 5 on MVSC 2010</title>
		<link>http://www.allegro.cc/forums/view/605772</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Tue, 14 Dec 2010 00:02:22 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi all,</p><p>I have beginner/intermediate knowledge in coding using Dev-C++. I thought this compiler was very user friendly, however now I am willing to move to something more &quot;standard&quot; and I installed Microsoft Visual C++ 2010.</p><p>Most of my knowledge was coding using the Ncruses library, quite ugly interface but very straightforward for displaying stats in console mode.</p><p>Anyway, I have installed MVSC 2010, downloaded allegro 5, copy pasted all files where they should go.</p><p>However, when I take any example such as the one displayed here:<br /><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></p><p>when I hit the compile button I have the following errors:</p><p>1&gt;------ Build started: Project: Allegro_testrun, Configuration: Debug Win32 ------<br />1&gt;  Main.cpp<br />1&gt;Main.obj : error LNK2019: unresolved external symbol __imp__al_destroy_display referenced in function _main<br />1&gt;Main.obj : error LNK2019: unresolved external symbol __imp__al_rest referenced in function _main<br />1&gt;Main.obj : error LNK2019: unresolved external symbol __imp__al_flip_display referenced in function _main<br />1&gt;Main.obj : error LNK2019: unresolved external symbol __imp__al_clear_to_color referenced in function _main<br />1&gt;Main.obj : error LNK2019: unresolved external symbol __imp__al_map_rgb referenced in function _main<br />1&gt;Main.obj : error LNK2019: unresolved external symbol __imp__al_create_display referenced in function _main<br />1&gt;Main.obj : error LNK2019: unresolved external symbol __imp__al_install_system referenced in function _main<br />1&gt;C:\Users\wboustany\Desktop\Project_Allegro\Allegro_testrun\Debug\Allegro_testrun.exe : fatal error LNK1120: 7 unresolved externals<br />========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</p><p>I have linked the following libraires to no avail:<br />allegro_main-5.0.0-RC2-md.lib<br />allegro_main-5.0.0-RC2-mt.lib<br />allegro_main-5.0.0-RC2-static-md.lib<br />allegro_main-5.0.0-RC2-static-mt.lib</p><p>Can anyone provide guidance, I have been looking for hours now.</p><p>Thx.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Inquisiteur)</author>
		<pubDate>Fri, 10 Dec 2010 20:41:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you link to the static libraries, you need to do this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="p">#define ALLEGRO_STATICLINK</span>
<span class="p">#include &lt;allegro5/allegro.h&gt;</span>
</pre></div></div><p>
(Or you can put that <span class="source-code"><span class="p">#define</span></span> in your project settings.)</p><p>Oh, and you want to link to the allegro- ... library too. The main one is not what you think it is.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Fri, 10 Dec 2010 20:44:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You also need to link to the core allegro library, not just allegro_main.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Fri, 10 Dec 2010 20:47:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thank you for your kind answers.</p><p>Is the core library included in the file I have downloaded from here ? </p><p><a href="http://www.allegro.cc/files/">http://www.allegro.cc/files/</a></p><p>or is it another .zip file ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Inquisiteur)</author>
		<pubDate>Fri, 10 Dec 2010 20:56:44 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It is in there.</p><p>For release mode, it&#39;s easiest to use the monolithic, static, mt version. That&#39;s the only Allegro library you&#39;d need to link with. (Additional Windows libraries like winmm.lib, opengl32.lib, glu32.lib, and psapi.lib would have to be explicitly added to the list.)</p><p>Otherwise, you need to link with allegro, allegro-main, and any add-on that you use.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Fri, 10 Dec 2010 21:03:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Core is just <span class="source-code">allegro-5.0.0-RC2-<span class="k3">*</span>.lib</span>.</p><p>I suggest you to use <span class="source-code">allegro-5.0.0-RC2-monolith-<span class="k3">*</span>.lib</span> as Matthew said.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michał Cichoń)</author>
		<pubDate>Fri, 10 Dec 2010 21:21:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think it is working now, thank you all very much for your help.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Inquisiteur)</author>
		<pubDate>Fri, 10 Dec 2010 21:28:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>To make things less daunting, I&#39;ll probably add a secondary minimal package on a.cc&#39;s file page. e.g., allegro-min-5.0.0-rc2-msvc-10.0.zip would contain:</p><ul><li><p>readme.txt
</p></li><li><p>include/*
</p></li><li><p>lib/allegro-5.0.0-monolith-static-md.lib
</p></li><li><p>lib/allegro-5.0.0-monolith-static-mt.lib</p></li></ul><p>Michał, would anything else be needed? (I&#39;m just using your binaries.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Fri, 10 Dec 2010 21:39:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You need to include all other static libraries for dependencies like libFLAC, libOgg and others found in archive. Also for MSVC pdb files will be importand while linking to debug version (linker complain when they are missing).</p><p>Matthew, I can configure my script to prepare both: full and monolith (aka min) packages. People looks confused with naming and amount of files included, so also I will add README file.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michał Cichoń)</author>
		<pubDate>Sun, 12 Dec 2010 18:29:04 +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/605772/894296#target">Michał Cichoń</a> said:</div><div class="quote"><p> Also for MSVC pdb files will be importand while linking to debug version
</p></div></div><p>If they don&#39;t have the source code, the debug version isn&#39;t very useful. (The asserts might still be helpful.) Also, somebody who doesn&#39;t understand how to link with the various libraries, probably won&#39;t understand how to debug anyway... In fact, I&#39;m not even sure I&#39;d package the -md builds in it.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p> I can configure my script to prepare both: full and monolith (aka min) packages ... so also I will add README file.
</p></div></div><p>I already have a script that unarchives the packages to modify them and put them in zips. (They were 7z&#39;s on the allegro5 site.) So I was going to just create the minimal archives then and insert a readme. So it doesn&#39;t really matter to me if you do it or not.</p><p>Regarding the readme, I was just going to keep it very minimal. Something like:
</p><pre>Allegro 5.0.0 for MinGW 4.5

See <a href="http://www.allegro.cc/manual/5/install/windows.html">http://www.allegro.cc/manual/5/install/windows.html</a> for installation instructions.
</pre><p>

(The URL might change before 5.0.0 is released.)
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 12 Dec 2010 23:22:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>PDB are there to shut up the linker, that&#39;s the main reason if you do not have sources.</p><p>Good point with README. I think a copy of this site should be included in case of offline usage.</p><p>There is an error in this site:
</p><div class="source-code snippet"><div class="inner"><pre>allegro<span class="k2">[</span>_module<span class="k2">]</span><span class="k3">-</span><span class="k2">[</span>version<span class="k2">]</span><span class="k2">[</span><span class="k3">-</span><span class="k1">static</span>,<span class="k3">-</span>monolith<span class="k2">]</span><span class="k3">-</span><span class="k2">[</span>mt,md<span class="k2">]</span><span class="k2">[</span><span class="k3">-</span>debug<span class="k2">]</span>
</pre></div></div><p>

Should be:
</p><div class="source-code snippet"><div class="inner"><pre>allegro<span class="k2">[</span>_module<span class="k2">]</span><span class="k3">-</span><span class="k2">[</span>version<span class="k2">]</span><span class="k2">[</span><span class="k3">-</span><span class="k1">static</span><span class="k2">]</span><span class="k2">[</span><span class="k3">-</span>monolith<span class="k2">]</span><span class="k3">-</span><span class="k2">[</span>mt,md<span class="k2">]</span><span class="k2">[</span><span class="k3">-</span>debug<span class="k2">]</span>
</pre></div></div><p>

Because monolith version can be compiled as DLL.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michał Cichoń)</author>
		<pubDate>Mon, 13 Dec 2010 16:13:03 +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/605772/894421#target">Michał Cichoń</a> said:</div><div class="quote"><p> Good point with README. I think a copy of this site should be included in case of offline usage.
</p></div></div><p>The main reason I like to avoid including the docs directly with the archive is that the docs are sometimes updated (particularly configuring an IDE) after the archives are created. If people download the archive and leave them sitting around, they are more apt to read from old documentation.</p><p>Those who know they will be installing offline, could just save or print out the relevant pages: the main one, and the one specific to their IDE.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Mon, 13 Dec 2010 22:42:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>So I think URL should be exposed in README with statement &quot;For more recent doc see: url&quot;. </p><p>Off-line version dumped at package creation time may still be included bellow it for quick reference. That&#39;s not of course the must.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Michał Cichoń)</author>
		<pubDate>Tue, 14 Dec 2010 00:02:22 +0000</pubDate>
	</item>
</rss>
