<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Allegro 4.4.2 setup on MSVS9</title>
		<link>http://www.allegro.cc/forums/view/609216</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 08 Jan 2012 00:45:37 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m having problems getting Allegro 4.4.2 working on MSVS9.  Does anyone know of a tutorial on how to get Allegro 4.4.2 working with MSVS9?  I searched the Internet and can only find tutorials on getting Allegro 4.2 working with MSVS9.  I think a specific and verbose walk-through would really be handy to help newbs like myself dabbling with Allegro 4.</p><p>Early last year I cobbled together a walk-through from other tutorials on how to get Allegro 4.2.3 working on MSVS9, from the installation of MSVS9 to compiling a simple Allegro program, including doing static linking.  Since then I&#39;ve been working here and there on a humorous Pac-Man clone.  Though now I want to utilize PNG routines in this game without needing to include dlls for zlib and libpng in the release.  I was told that Allegro 4.4.2 is the way to go, short of dumping Allegro 4 for Allegro 5, as the Allegro 4.4.2 libraries for download here can be statically linked.  Forgive me for not having much of a command of compiler concepts.  I know it&#39;s easy to say to someone asking for help to get with it and learn about their IDE before delving into game programming.  Though I also see these annoying IDE issues as separate from pure game programming, granted, a good game programmer should be strong in both areas.</p><p>I&#39;m going to transcribe my instructions on how to specifically get Allegro 4.2.3 working with MSVS9 to a text file and attach them to this thread.  I was wondering if someone would help convert that walk-through from getting Allegro 4.2.3 working on MSVS9 to getting getting Allegro 4.4.2 working on MSVS9.  Granted, if no one thinks such a tutorial is worthwhile, that&#39;s understandable.  Thanks!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sat, 07 Jan 2012 06:00:20 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><a href="http://www.allegro.cc/files/?v=4.4">http://www.allegro.cc/files/?v=4.4</a></p><p>Download the files for MSVC 9, and then configure your project to search the directories in them, allegro\bin for library searches, and allegro\include for header searches.</p><p>To static link, link against these libraries :
</p><pre>
alleg44-monolith-static-mt.lib
loadpng.lib
zlib.lib

kernel32.lib
user32.lib
gdi32.lib
comdlg32.lib
ole32.lib
dinput.lib
ddraw.lib
dxguid.lib
winmm.lib
dsound.lib
</pre><p>
(The first three will probably have different names, just use the static version, and use -mt or -md depending on how your project is configured to link to the C runtime).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sat, 07 Jan 2012 06:07:58 +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/609216/942937#target">Mike Young</a> said:</div><div class="quote"><p> I was told that Allegro 4.4.2 is the way to go, short of dumping Allegro 4 for Allegro 5, as the Allegro 4.4.2 libraries for download here can be statically linked.</p></div></div><p>Allegro 5 also comes with libraries that can be linked statically to your game. In the wiki you have a tutorial explaining how to do it, statically, dynamically including how to do it using the monolith version. You&#39;ll end up with just one an single file <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (AMCerasoli)</author>
		<pubDate>Sat, 07 Jan 2012 06:18:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi Edgar,</p><p>Currently I&#39;m getting this error...</p><p>&quot;This application has failed to start because allegro.dll was not found.  Re-installing the application max fix this problem.&quot;</p><p>Here&#39;s everything I&#39;ve done so far in trying to get it to work from the ground-up...</p><p>Install Visual C++ 2008 Express Edition.</p><p>Download the Allegro 4.4.2 library (allegro-4.4.2-msvc-9.0.zip).</p><p>Unzip allegro-4.4.2-msvc-9.0.zip to &quot;C:\allegro-4.4.2-msvc-9.0&quot;.</p><p>Start Visual C++ 2008.</p><p>Go to: Tools --&gt; Options.<br />Go to: Projects and Solutions --&gt; VC++ Directories.<br />Under &quot;Show directories for:&quot; select &quot;Include files&quot;.<br />Create a new line and select the Allegro pre-built library&#39;s include folder, &quot;C:\allegro-msvc9-4.2.3\include&quot;.<br />Under &quot;Show directories for:&quot; select &quot;Library files&quot;.<br />Create a new line and select the Allegro pre-built library&#39;s lib folder, &quot;C:\allegro-msvc9-4.2.3\lib&quot;.<br />Click OK to close Options.</p><p>Create a new Visual C++ 2008 Empty Project...<br />File --&gt; New --&gt; Project..., General, Empty Project<br />Enter a name for the project and click OK.  In this example we&#39;ll call the project &quot;TestProject&quot;.<br />Go to: Project --&gt; Properties.<br />Go to: Configuration Properties --&gt; Linker --&gt; Input.<br />Under &quot;Additional Dependencies&quot; enter &quot;allegro-4.4.2-monolith-static-mt.lib&quot; and click OK.<br />Go to: Project --&gt; Add New Item..., select C++ file, call it main.cpp, and click &quot;Add&quot;.<br />Add the following code to main.cpp...</p><p>#include &lt;allegro.h&gt;<br />#include &lt;stdio.h&gt;</p><p>int main(void) {</p><p>   set_color_depth(16);<br />   if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0, 0) != 0) {<br />      allegro_message(&quot;Couldn&#39;t set graphics mode!\n&quot;);<br />      return 1;<br />   }</p><p>   textprintf_centre_ex(screen, font, screen-&gt;w/2, 196, makecol(0, 0, 0), makecol(0, 0, 0), &quot;Hello world!&quot;);</p><p>   while (key[KEY_ESC] == 0) {   // wait for ESC to be pressed<br />   }</p><p>   allegro_exit();<br />   return 0;<br />}  <br />END_OF_MAIN()</p><p>Click --&gt; Debug --&gt; Start Debugging (or press F5 or click on the green &quot;play&quot; button).  You will be prompted to build the project.  Click Yes.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sat, 07 Jan 2012 07:03:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Project Properties / Debugging:</p><p>Environment: PATH=C:\allegro-4.4.2-msvc-9.0\bin;%PATH%
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 07 Jan 2012 07:08:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hmm, I tried adding the path but I still get the same error.  I cannot find any file on my computer named &quot;allegro.dll&quot;.</p><p>Under &quot;Additional Dependencies&quot; I changed &quot;allegro-4.4.2-monolith-static-mt.lib&quot; to &quot;allegro-4.4.2-md.lib&quot; and then I get the error &quot;This application has failed to start because MSVCR90.dll was not found.  Re-installing the application max fix this problem.&quot;
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sat, 07 Jan 2012 07:55:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It shouldn&#39;t be asking for it since you are static linking. Double check which libraries you are linking against.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 07 Jan 2012 08:05:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks again for the help.</p><p>I know that with Allegro 4.2.3 I had to do the following to get static linking working...</p><p>Download dx70_min.zip and extract to &quot;C:\dx70_min&quot;.<br />Go to: Tools --&gt; Options<br />Go to: Projects and Solutions --&gt; VC++ Directories<br />Under &quot;Show directories for:&quot; select &quot;Include files&quot;.<br />Create a new line and select &quot;C:\dx70_min\include&quot;.<br />Under &quot;Show directories for:&quot; select &quot;Library files&quot;.<br />Create a new line and select &quot;C:\dx70_min\lib&quot;.</p><p>Project Properties --&gt; Configuration Properties<br />C/C++ --&gt; Preprocessor --&gt; Preprocessor Definitions: ALLEGRO_STATICLINK<br />C/C++ --&gt; Code Generation --&gt; Runtime Library: /MT<br />Linker --&gt; Input --&gt; Additional Dependencies:<br />alleg_s_crt.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib<br />Linker --&gt; Command Line --&gt; Additional Options: /LTCG</p><p>I just made those changes (except I specified &quot;allegro-4.4.2-monolith-static-mt.lib&quot; instead of &quot;alleg_s_crt.lib&quot;) and now I get these errors:</p><p>main.obj : error LNK2001: unresolved external symbol _key<br />main.obj : error LNK2001: unresolved external symbol _font<br />main.obj : error LNK2001: unresolved external symbol _screen
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sat, 07 Jan 2012 08:26:23 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are those the only three errors you get?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (torhu)</author>
		<pubDate>Sat, 07 Jan 2012 09:28:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yep, just those 3 errors, well, those 3 and one more fatal error simply stating there are unresolved externals.  When I comment out what the errors are referring to, Allegro symbols, we go back to that first error message...</p><p>&quot;This application has failed to start because allegro.dll was not found.  Re-installing the application max fix this problem.&quot;</p><p>I must not have configured something in MSVS9 properly.  I got it figured out with 4.2.3 with the help of a hold your hand tutorial and pretty pictures as it&#39;s easy for a newb to get lost in the sea of menus in Visual Studio.  <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />  If I can get this figured out I&#39;m so going to create a hold your hand tutorial for this.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sat, 07 Jan 2012 09:40:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hmmm... are you sure that you&#39;ve done the exact settings that you&#39;ve posted?  And are you sure you haven&#39;t configured the Debug build, then tried the Release build, or something like that?</p><p>That it asks for allegro.dll is a clear sign that you&#39;re linking with the wrong library.  The missing symbols point in the same direction.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (torhu)</author>
		<pubDate>Sat, 07 Jan 2012 12:54:55 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, for a bit I think I was messing with debug and running release and vice-versa, but I then started configuring both settings the same and was mindful of those settings.  If only I could formulate the instructions to make it work!  I have to be missing some setting(s).  I tried linking various pre-built 4.4.2 lib files and various combinations of settings with no luck, then went back to just dynamic linking with 4.2.3 and no problems.  I installed MSVS9 on a different system with a clean install of Windows to have a 2nd machine to tinker with.  I may mess with it more, but I&#39;m starting to feel maybe I should ditch the obsession of static linking everything, stick with dynamic linking with 4.2.3, and after this current project, move onto Allegro 5 or something else.  So I&#39;ll need to include some dlls with the release, big deal, right?  Still, wish I could figure this damn thing out.  Granted, I should have been working more on my game more instead of obsessing about static linking everything!  Doh!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sat, 07 Jan 2012 14:58:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You could try just starting afresh by creating a new MSVC project, in case there are some settings you are not aware of.  But I suppose you&#39;ve already done that.  Or you could just get on with your game <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (torhu)</author>
		<pubDate>Sat, 07 Jan 2012 18:50:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, just tried again with another new project and same result.  Maybe I&#39;ll try MSVS10 or MinGW with the corresponding pre-built libraries.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sat, 07 Jan 2012 23:48:59 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The binary package is broken, allegro-4.4.2-monolith-static-mt.lib references allegro.dll <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" /></p><p>If you search inside allegro-4.4.2-monolith-static-mt.lib, you can see that it contains the string &quot;allegro.dll&quot; several times.  Other files in the package seem to be broken in the same way.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (torhu)</author>
		<pubDate>Sun, 08 Jan 2012 00:23:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You could ask <a href="http://www.allegro.cc/members/micha.cichon">Michał Cichoń</a> to fix the packages. In the meantime, just use whatever works. When you want to release your game, you could probably use the 4.4 static MinGW binaries.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 08 Jan 2012 00:35:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Sounds good!  Thanks for the replies!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (myoung)</author>
		<pubDate>Sun, 08 Jan 2012 00:45:37 +0000</pubDate>
	</item>
</rss>
