<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Allegro 4.4.2 on Dev-C++ </title>
		<link>http://www.allegro.cc/forums/view/611482</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Mon, 26 Nov 2012 02:49:12 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I am trying to make my old and not so old Allegro 4 projects more compatible with <br />the newer operating systems (Vista/7) and newer hardware (Multi-Core).<br />Nothing special, but I just don&#39;t want it them to crash or malfunction like now.<br />Things already work better using acquire_screen(). </p><p>One of the things I want to do is to compile them to Allegro version 4.4.2. I am now trying with Dev-C++ and allegro-4.4.2-1mpx.DevPak. But one of my projects needs to be portable and run without allegro-4.4.2-mt.dll.</p><p>Now I never managed to get Dev-C++ to compile something static ever before, and again I am failing. The devpack does not seem to contain a static version library. Please advise.</p><p>PS. Another option is to install MSVC 6.0 on my newer Windows XP PC, but that thing contains so much functionality and options which I never use anyway.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gerwin Broers)</author>
		<pubDate>Thu, 22 Nov 2012 05:37:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Use Code::Blocks as an IDE rather than Dev-C++ and save yourself a lot of hassle, imho.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Yodhe23)</author>
		<pubDate>Thu, 22 Nov 2012 12:50:26 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for the tip on Code::Blocks, from their site it looks like an actively developed Dev-C++ Alternative. I will try it out soon.</p><p>It is just that wonsungi&#39;s post above mine is not very encouraging: &quot;Allegro 4 + Codeblocks problem&quot; </p><p>To be continued...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gerwin Broers)</author>
		<pubDate>Thu, 22 Nov 2012 19:01:16 +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/611482/970685#target">Gerwin Broers</a> said:</div><div class="quote"><p> It is just that wonsungi&#39;s post above mine is not very encouraging: &quot;Allegro 4 + Codeblocks problem&quot;</p></div></div><p>His problem has nothing to do with Code::Blocks.  Code::Blocks is just an editor, and it&#39;s the compiler that builds the programs.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Thu, 22 Nov 2012 19:42:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>See which version of gcc you use.<br />Download the relevant binary archive here:<br /><a href="http://www.allegro.cc/files/?v=4.4">http://www.allegro.cc/files/?v=4.4</a><br />(One of the lines &quot;MinGW x.y.z&quot;)<br />Look in the lib/ directory, and compare with what was installed by the devpak (a devpak is in ZIP format, if I remember correctly)<br />It is possible there was no static library, or that it didn&#39;t have the name you expected.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Thu, 22 Nov 2012 19:50:44 +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/611482/970688#target">Audric</a> said:</div><div class="quote"><p> a devpak is in ZIP format, if I remember correctly</p></div></div><p>It&#39;s in .tar.gz format
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (LennyLen)</author>
		<pubDate>Thu, 22 Nov 2012 19:55:16 +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/611482/970686#target">LennyLen</a> said:</div><div class="quote"><p>His problem has nothing to do with Code::Blocks.  Code::Blocks is just an editor, and it&#39;s the compiler that builds the programs.</p></div></div><p>
Five things that can cause a problem then: The Programming Interface, The Compiler, Allegro, The Program, The end user System/OS. I would like the first three covered as conveniently as possible, so I can focus on the program and the System/OS issues.</p><p>For now MSVC for static linking is only setup on my old Pentium III, which I have just put by my desk just for this sole purpose. I fixed program crashes in windowed mode in a dual core environment by using acquire_screen(). I put in a crude CPU Idler system. Pending is a malfunctioning mouse in Windows 7 in Fullscreen mode. Also in need of fixing is the poor handling of task switching. </p><p>@Audric <br />Looking at allegro-4.4.2-mingw-3.4.5.zip, and I see the same thing as in the devpak:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>liballegro-4.4.2-mt.a<br />liballegro-4.4.2-mt-debug.a<br />liballegro-4.4.2-monolith-mt.a<br />liballegro-4.4.2-monolith-mt-debug.a</p></div></div><p>
And some OpenGL and file format specific libraries. <br />Nothing that looks like a general static lib like alleg_s in older releases and the static lib in the current MSVC builds.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gerwin Broers)</author>
		<pubDate>Thu, 22 Nov 2012 22:15:30 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I checked again the files provided by a.cc.<br />Up to mingw 4.4 (included) there are no static versions of the libraries, but the library for mingw 4.5.2 does have them:
</p><ul><li><p>liballegro-4.4.2-monolith-static-md.a</p></li><li><p>liballegro-4.4.2-monolith-static-md-debug.a</p></li><li><p>liballegro-4.4.2-monolith-static-mt.a</p></li><li><p>liballegro-4.4.2-monolith-static-mt-debug.a</p></li></ul><p>
If you&#39;re comfortable with dev-cpp, note that you can configure it to run a specific mingw-gcc compiler rather than the old one (from 2006?) that&#39;s included with it. It works well, I&#39;ve always used dev-cpp with an installed version of MSYS + mingw.</p><p>If you continue developing, I would recommend upgrading to a recent version of mingw-gcc, however I have to warn that gcc 4 is slightly more strict than gcc 3, you may get quite a few errors/warnings to fix. Nothing critical, but still, it&#39;s a small time investment - and in any case, don&#39;t overwrite a mingw-gcc v3 compiler installation until you&#39;re sure you don&#39;t need it again.</p><p>Of course the laziest solution is open-source your works <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /> Your HeroQuest engine is popular enough that it&#39;s very likely to get volunteers to port it to more recent OSes / compilers.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Audric)</author>
		<pubDate>Thu, 22 Nov 2012 23:22:39 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have Installed and configured Code::blocks 10.05. That went well.</p><p>Setting up the whole MinGW-4.5.2 compiler was less straightforward. But I found that it needs these packages to compile an allegro application:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
gcc-core-4.5.2-1-mingw32-bin<br />gcc-c++-4.5.2-1-mingw32-bin<br />w32api-3.17-2-mingw32-dev<br />mingwrt-3.20-mingw32-dev<br />binutils-2.23.1-1-mingw32-bin<br />libgmp-5.0.1-1-mingw32-dll-10<br />libiconv-1.14-2-mingw32-dll-2<br />libmpc-0.8.1-1-mingw32-dll-2<br />libmpfr-2.4.1-1-mingw32-dll-1<br />allegro-4.4.2-mingw-4.5.2
</p></div></div><p>

I managed to statically link the allegro 4.4.2 libraries with the above. Static linking allegro adds 500kB to a tiny test program. The program is still Windows 98 compatible.</p><p>Next I setup the MSVC Express 2005/8.0 compiler too, with vcsetup.exe. Installing only the compiler itself. Next I Installed the libraries from the Windows SDK (Called Vista libraries, yuk), The DirectX70 lib package and allegro-4.4.2-msvc-8.0.<br />After adjusting some code it compiles my program, but sadly all MSVC allegro 4.4.2 packages have static libs that are broken, they refer to allegro.dll. </p><p><b>Currently the only binary allegro 4.4.2 package that can compile statically is allegro-4.4.2-mingw-4.5.2! All other packages, including the devpak, are either incomplete or broken in this regard. It would be nice if this situation is improved. <u>Until then I suggest that a Warning is displayed in the allegro.cc files page.</u></b></p><p>My try with cmake did not go well...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gerwin Broers)</author>
		<pubDate>Sat, 24 Nov 2012 20:35:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>If you want help with cmake, that is probably your easiest solution with MinGW and A4.4.2. What did you try and what didn&#39;t work?</p><p>Roughly, the commands to make Allegro 4 with cmake are something like :
</p><pre>
cd allegro4/allegro (just to wherever your allegro stuff is)
mkdir build
cd build
cmake -G &quot;MinGW Makefiles&quot; -DWANT_ALLEGROGL=on -DWANT_LOADPNG=on -DWANT_LOGG=on -DWANT_JPGALLEG=on -DSHARED=on -DCMAKE_BUILD_TYPE=Release ..
mingw32-make
mingw32-make install
</pre><p>
You can replace on with off for any of the options, and with SHARED off it builds the static version of allegro. CMAKE_BUILD_TYPE can be Debug Release or ReleaseWithDbg I think.</p><p>You have to have your compiler and cmake on the path and installed already.</p><p>I attached a log of a successful build - to get all the addons to build you have to have libpng and zlib installed for loadpng, along with libjpg for jpgalleg and libogg and libvorbis for logg. allegrogl doesn&#39;t have any dependencies except for allegro.</p><p>EDIT<br />Also, you can tell cmake to make solutions for MSVC to build allegro with. Call cmake --help for options for setting the -G &lt;Generator Name&gt; option.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sat, 24 Nov 2012 21:49:47 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thank you. Using your log file I managed to build two libs for MinGW. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /><br />It is the base lib without addons requiring alleg44.dll, together with a static version, for MinGW-4.5.2. <b>(attached)</b></p><p>Unfortunately, after changing -G &lt;generator-name&gt; to &quot;Visual Studio 8 2005&quot; or &quot;NMake Makefiles&quot; it keeps throwing errors at me:<br />CMAKE_MAKE_PROGRAM / CMAKE_C_COMPILER / CMAKE_CXX_COMPILER not set, even when I set them as environment variables. I don&#39;t know how to tell cmake what it needs to run. Is mingw32-make also replaced with nmake?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gerwin Broers)</author>
		<pubDate>Sun, 25 Nov 2012 04:56:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Are you using the latest version of cmake?</p><p>Actually, try running MSVC&#39;s batch file to set up a build environment, or it&#39;s command line shortcut, and then run cmake and such from there.</p><p>As far as I know, cmake will build solutions for MSVC, and then you go into MSVC and build the solution.</p><p>Don&#39;t know about nmake.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 25 Nov 2012 09:03:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I used the latest version of cmake 2.8.10 -&gt; &quot;cl.exe -- broken ... could not compile test program&quot; <br />Read about it being a bug with MSVC express, and about using an older version: 2.2.3 -&gt; &quot;cannot find modules path&quot; (it ain&#39;t even trying)<br />Read about using an older version: 2.0.6 -&gt; &quot;could not create named generator&quot; / &quot;Unable to find &#39;Visual Studio 6&#39;&quot;</p><p>..This thing is just messing with me, I give up, and use MinGW until someone else manages to build allegro 4.4.2 statically with MSVC 8.0/2005.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gerwin Broers)</author>
		<pubDate>Sun, 25 Nov 2012 22:29:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Like with all compilers, it needs to be on your %PATH%. So try running cmake from the command line build environment that MSVC provides. It sets up the path to run the compiler, so cmake may work after you do that. IDK.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sun, 25 Nov 2012 22:53:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just tried the exact same thing with an install of MSVC 2005 (not the free express edition) at a friends place: it works right away.</p><p>Edit1: <br />The resulting dll is not as reliable as the one I used earlier.<br />Also using the static lib I get errors like this &quot;MSVCRT.lib(MSVCR80.dll)||error LNK2005: _atof already defined in LIBCMT.lib&quot;.<br />Using the /MD compiler directive it builds my program, but the program fails to read ini and text files!? The non-static executables does not have this problem. Both type of executable give an error when renamed and run.</p><p>Edit2:<br />I can now Build Allegro at home with the Express edition of MSVC 2005. <br />The problem was related to .\VC\BIN\ <b>mspdb80.dll</b>. I renamed it to mspdb80.dlx during the build, and that fixed it. The Issue in Edit1 is again present...</p><p>Edit3: <br />Build the allegro source again, but now with some differences:<br />-Applied &quot;fix.bat MSVC8&quot; to the source.<br />-Cmake generator &quot;Visual Studio 8 2005&quot; to create project files.<br />-Opened the project file with the MSVC 2005 interface, selecting /MT or /MD options, then &quot;batch build&quot;.</p><p>The resulting linked and static /MT libs+dlls behave much better. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />  <b>(attached)</b>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Gerwin Broers)</author>
		<pubDate>Mon, 26 Nov 2012 02:49:12 +0000</pubDate>
	</item>
</rss>
