<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Weird problem with _draw_sprite and others</title>
		<link>http://www.allegro.cc/forums/view/588952</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 09 Dec 2006 18:45:41 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Using MSVC 6, Allegro 4.2.1, WindowsXP<br />I have followed these instructions</p><p>STATIC COMPILATION<br />In release mode I get these errors:</p><p><tt>
Linking...
LINK : warning LNK4049: locally defined symbol &quot;_draw_sprite&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_allegro_message&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_al_findnext&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_al_findfirst&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_make_absolute_filename&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_set_gfx_mode&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_load_bitmap&quot; imported
character.obj : error LNK2001: unresolved external symbol __imp__draw_sprite_h_flip
OLAF___Win32_Release/OLAF.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
OLAF.exe - 2 error(s), 7 warning(s)
</tt></p><p>This is the line that makes the error
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/draw_sprite_h_flip" target="_blank"><span class="a">draw_sprite_h_flip</span></a><span class="k2">(</span>dibuja, animation.e_frame<span class="k2">[</span>act_frame<span class="k2">]</span>.e_map ,<a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>animation.e_frame<span class="k2">[</span>act_frame<span class="k2">]</span>.x_offset <span class="k3">+</span> x<span class="k2">)</span> ,<a href="http://www.delorie.com/djgpp/doc/libc/libc_38.html" target="_blank">abs</a><span class="k2">(</span>y<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

I tried using the 3 static modes, and I get the same results</p><p>DYNAMIC COMPILATION<br />In release mode I get these errors:</p><p><tt>
Linking...
alleg.lib(alleg42.dll) : error LNK2005: _draw_sprite already defined in olaf.obj
olaf.obj : error LNK2001: unresolved external symbol _allegro_error
olaf.obj : error LNK2001: unresolved external symbol _key
olaf.obj : error LNK2001: unresolved external symbol _screen
olaf.obj : error LNK2001: unresolved external symbol _font
OLAF___Win32_Dynamic_Debug/OLAF.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
OLAF.exe - 6 error(s), 2 warning(s)
</tt>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Fri, 08 Dec 2006 04:40:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>When using static builds, you need to set up the static define so Allegro knows what&#39;s going on. Regarding the dynamic link (and possibly the static one as well), it looks like you need to do a clean rebuild.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 09 Dec 2006 04:07:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>

I am doing things well now, and set up six configurations for realease, debug and profile in dynamic and static modes.<br />But there is a problem is driving me crazy:</p><p>In dynamic debug mode I get this<br /><tt>
compiling...
character.cpp
file_name_generator.cpp
frame.cpp
maps.cpp
olaf.cpp
timer.c
Linking...

OLAF.exe - 0 error(s), 0 warning(s)
</tt></p><p>But in static debug mode I get this:</p><p><tt>
Compiling...
character.cpp
file_name_generator.cpp
frame.cpp
maps.cpp
olaf.cpp
timer.c
Linking...
LINK : warning LNK4049: locally defined symbol &quot;_draw_sprite&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_destroy_bitmap&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_allegro_message&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_al_findnext&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_al_findfirst&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_make_absolute_filename&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_set_gfx_mode&quot; imported
LINK : warning LNK4049: locally defined symbol &quot;_load_bitmap&quot; imported
character.obj : error LNK2001: unresolved external symbol __imp__draw_sprite_h_flip
OLAF___Win32_Debug/OLAF.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...

OLAF.exe - 2 error(s), 8 warning(s)
</tt></p><p>WHY??? I followed the instructions, I tried several combinations, but it doesn&#39;t work.<br />Compiling in release static mode works fine but add some warnings.<br />In every configuration I get different results, I hate that.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Paul whoknows)</author>
		<pubDate>Sat, 09 Dec 2006 07:41:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In what order are you linking the libs?</p><p>[edit]<br />Not that I know if that would make a difference, but it certainly does on MinGW...<br />[/edit]
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bhagabhi)</author>
		<pubDate>Sat, 09 Dec 2006 18:45:41 +0000</pubDate>
	</item>
</rss>
