<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>JPGAlleg not working--link errors</title>
		<link>http://www.allegro.cc/forums/view/280648</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 10 Jul 2003 02:28:43 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I just compiled the JPGAlleg library, version 2.1, and everything went well, but when I try to incorporate it into a program, I get all these linker errors:</p><p>C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x1126):encode.c: undefined reference to `_imp___rgb_r_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x1137):encode.c: undefined reference to `_imp___rgb_g_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x1147):encode.c: undefined reference to `_imp___rgb_b_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x11e5):encode.c: undefined reference to `_imp___rgb_r_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x11f8):encode.c: undefined reference to `_imp___rgb_g_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x1208):encode.c: undefined reference to `_imp___rgb_b_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x12de):encode.c: undefined reference to `_imp__cpu_capabilities&#39;<br />C:\DEV-CPP\lib/libjpgal.a(encode.o)(.text+0x12e8):encode.c: undefined reference to `_imp___rgb_r_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x12d4):decode.c: undefined reference to `_imp___rgb_r_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x12df):decode.c: undefined reference to `_imp___rgb_g_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x12f0):decode.c: undefined reference to `_imp___rgb_b_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x13b1):decode.c: undefined reference to `_imp___rgb_r_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x13bc):decode.c: undefined reference to `_imp___rgb_g_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x13cd):decode.c: undefined reference to `_imp___rgb_b_shift_32&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x17ae):decode.c: undefined reference to `_imp__cpu_capabilities&#39;<br />C:\DEV-CPP\lib/libjpgal.a(decode.o)(.text+0x17b8):decode.c: undefined reference to `_imp___rgb_r_shift_32&#39;</p><p>All these errors, and all I did was use the jpgalleg_init() function. I&#39;m compiling a static-linked program with Dev-C++. The DUMB mod-playing library is also being linked with it as well (my program has music too). I&#39;m compiling the program with these linker options:<br />-laldmd -ldumbd -lalleg_s -lgdi32 -ldxguid -lole32 -ldinput -lddraw -lwinmm -ldsound -ljpgal</p><p>I hate linker errors...<br />-matt
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matt Sarnoff)</author>
		<pubDate>Tue, 08 Jul 2003 08:22:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try using:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k3">-</span>ljpgal <span class="k3">-</span>laldmd <span class="k3">-</span>ldumbd <span class="k3">-</span>lalleg_s <span class="k3">-</span>lgdi32 <span class="k3">-</span>ldxguid <span class="k3">-</span>lole32 <span class="k3">-</span>ldinput <span class="k3">-</span>lddraw <span class="k3">-</span>lwinmm <span class="k3">-</span>ldsound
</pre></div></div><p> <br />instead. The link order matters.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Bob)</author>
		<pubDate>Tue, 08 Jul 2003 08:25:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Bob is right. From JPGalleg readme.txt file, FAQ section:</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Q) I get a &quot;undefined reference to: &#39;register_datafile_object&#39;&quot; message when<br />   linking my program, while the examples shipped with the library compiled<br />   nicely. What&#39;s wrong?</p><p>A) Try swapping the order with which you link Allegro and JPGalleg to your<br />   program. This should solve the problem.</p></div></div><p>

Ok, you don&#39;t get the error on that particular function, but you should have got the point.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lillo)</author>
		<pubDate>Tue, 08 Jul 2003 18:02:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I compiled the program as an alleg40.dll-dependent version, and put -lpgal first, and it works perfectly. Thanks.</p><p>Hey Angelo...back in my QBasic days, I used to make sound effects for my games with your Soundlab program--it was awesome.</p><p>Oh yeah...and Wetspot rocks!</p><p>-matt
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matt Sarnoff)</author>
		<pubDate>Wed, 09 Jul 2003 04:10:14 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>heh, thanks <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" /></p><p>note to self: should really finish new Wetspot some day...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (lillo)</author>
		<pubDate>Thu, 10 Jul 2003 02:28:43 +0000</pubDate>
	</item>
</rss>
