<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Basic linker problems with Allegro</title>
		<link>http://www.allegro.cc/forums/view/618765</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 29 Dec 2022 00:33:04 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It&#39;s been many years since I compiled anything that uses Allegro. I have some code that&#39;s a little over a decade old now, and it&#39;s dependent on 4.4.2. I have barely touched C/C++ in the past decade, so I&#39;m finding myself a bit rusty on things.</p><p>I have Code::Blocks and MinGW setup, but I cannot for the life of me get this code to compile. I get Allegro-related messages, presumably from the linker:</p><p>&quot;undefined reference to &#39;clear_bitmap&#39;&quot;<br />&quot;undefined reference to &#39;poll_mouse&#39;&quot;</p><p>... etc.</p><p>I have the following Linker settings:</p><ul><li><p>E:\allegro-4.4.2-mingw-4.5.2\lib\liballegro-4.4.2-static-md.a
</p></li><li><p>E:\allegro-4.4.2-mingw-4.5.2\lib\libzlib-1.2.5-static-md.a</p></li></ul><p>I have the following Search directories:</p><p>[COMPILER]
</p><ul><li><p>E:\allegro-4.4.2-mingw-4.5.2\include
</p></li><li><p>E:\alpng13\src
</p></li><li><p>E:\Program Files\CodeBlocks\MinGW\x86_64-w64-mingw32\include</p></li></ul><p>[LINKER]
</p><ul><li><p>E:\allegro-4.4.2-mingw-4.5.2\lib
</p></li><li><p>E:\Program Files\CodeBlocks\MinGW\x86_64-w64-mingw32\lib</p></li></ul><p>I can&#39;t think of anything else I need to add. Any suggestions?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Damian Grove)</author>
		<pubDate>Thu, 22 Dec 2022 12:28:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I haven&#39;t used A4 for a looong time, but when linking statically with A5, I set this at the top of my linker settings:</p><p>-DALLEGRO_STATICLINK</p><p>(In &quot;Other linker settings&quot;).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Dizzy Egg)</author>
		<pubDate>Thu, 22 Dec 2022 15:47:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I forgot about that, thanks!</p><p>However, it doesn&#39;t seem to impact my build at all. I get the very same series of errors. <img src="http://www.allegro.cc/forums/smileys/undecided.gif" alt=":-/" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Damian Grove)</author>
		<pubDate>Fri, 23 Dec 2022 04:18:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Damian Grove - I invite you to try my A4.4.3 binaries.</p><p>The compiler I used is here :<br /><a href="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z">https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z</a></p><p>The binaries for Allegro 4.4.3 and the binaries for Eagle Classic (works with above) are here :</p><p><a href="https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/">https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/</a></p><p>UPDATE<br />Here is a full list of the libraries you need to link to when linking statically.</p><p><a href="https://www.allegro.cc/files/attachment/613288">https://www.allegro.cc/files/attachment/613288</a></p><pre>

-static
-lalleggl
-ljpgalleg
-lloadpng
-llogg
-lalleg-debug-static
-lvorbis
-lvorbisenc
-lvorbisfile
-logg
-lpng16
-lzlibstatic

-lkernel32
-luser32
-lgdi32
-lcomdlg32
-lole32
-ldinput
-lddraw
-ldxguid
-lwinmm
-ldsound
</pre><p>

-static-libstdc++<br />-static-libgcc</p><p>-static -lalleggl -ljpgalleg -lloadpng -llogg -lalleg-debug-static -lvorbis -lvorbisenc -lvorbisfile -logg -lpng16 -lzlibstatic -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound -static-libstdc++ -static-libgcc
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Thu, 29 Dec 2022 00:33:04 +0000</pubDate>
	</item>
</rss>
