<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>can you help me ?</title>
		<link>http://www.allegro.cc/forums/view/331111</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 31 Jan 2004 20:43:20 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hello,</p><p>ive now decided to use Mingw32 instead of MSVC.<br />I&#39;ve compiled allegro, allegrogl, ode and installed the opegl libs and dlls all successfully.<br />I&#39;ve downloaded the carterrain demo (sources) from <a href="http://benny.kramekweb.com">http://benny.kramekweb.com</a>.<br />during compiling i get following error message:<br />C:\MinGW\source\carterrain\src&gt;make<br />gcc -c main.cpp -o main.o -O3<br />gcc -c glode.cpp -o glode.o -O3<br />gcc -c trig.cpp -o trig.o -O3<br />gcc -c geometry.cpp -o geometry.o -O3<br />gcc -c intro.cpp -o intro.o -O3<br />gcc -c car.cpp -o car.o -O3<br />gcc -c camera.cpp -o camera.o -O3<br />gcc -c skybox.cpp -o skybox.o -O3<br />gcc -c splash.cpp -o splash.o -O3<br />splash.cpp: In function `int setup()&#39;:<br />splash.cpp:92: invalid conversion from `char*(*)(int, int*)&#39; to `void*&#39;<br />splash.cpp:92: invalid conversion from `char*(*)(int, int*)&#39; to `void*&#39;<br />splash.cpp:92: invalid conversion from `char*(*)(int, int*)&#39; to `void*&#39;<br />make: *** [splash.o] Error 1</p><p>I think the error lies in this codelines:</p><p>static int setup (void)<br />{<br />#define RESOLUTION_LIST   4<br />#define COLOUR_LIST       6<br />#define ZBUFFER_LIST      8<br />#define WINDOWED_BOX      9<br />#define DOUBLEBUFFER_BOX 10<br />#define BUTTON_OK        11<br />	<br />	DIALOG dlg[] = {<br />    /*	proc                 x    y    w    h  fg bg  key    flags d1 d2  dp */<br />    {	d_shadow_box_proc,   0,   0, 320, 200,  0, 0,   0,         0, 0, 0, NULL },<br />    {	d_ctext_proc,      160,  10,   0,   0,  0, 0,   0,         0, 0, 0, (char*)&quot;______________________________&quot; },<br />    {	d_ctext_proc,      160,   8,   0,   0,  0, 0,   0,         0, 0, 0, (char*)&quot;carterrain OpenGL window setup&quot; },<br />    {	d_text_proc,        10,  30,   0,   0,  0, 0,   0,         0, 0, 0, (char*)&quot;Resolution&quot; },<br />    {	d_list_proc,        10,  40,  96,  48,  0, 0,   0,         0, 1, 0, resolution_lister },<br />    {	d_text_proc,       120,  30,   0,   0,  0, 0,   0,         0, 0, 0, (char*)&quot;Colour depth&quot; },<br />    {	d_list_proc,       120,  40,  96,  48,  0, 0,   0,         0, 1, 0, colour_depth_lister },<br />    {	d_text_proc,        10, 104,  96,  48,  0, 0,   0,         0, 0, 0, (char*)&quot;Z-buffer depth&quot; },<br />    {	d_list_proc,        10, 114,  96,  48,  0, 0,   0,         0, 1, 0, zbuffer_depth_lister },<br />    {	d_check_proc,       10, 170,  96,   8,  0, 0,   0,         0, 1, 0, (char*)&quot;Windowed&quot; },<br />    {	d_check_proc,       10, 180, 128,   8,  0, 0,   0,D_SELECTED, 1, 0, (char*)&quot;Double Buffered&quot; },<br />    {	d_button_proc,     220, 150,  96,  18,  0, 0,   0,    D_EXIT, 0, 0, (char*)&quot;Ok&quot; },<br />    {	d_button_proc,     220, 174,  96,  18,  0, 0,   0,    D_EXIT, 0, 0, (char*)&quot;Exit&quot; },<br />    {	NULL }<br />	};</p><p>Can anybody give me a tip ?</p><p>Thanks all for your great an fast support !
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Heinz Schmitz)</author>
		<pubDate>Fri, 30 Jan 2004 15:25:18 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>EDIT: read it again; and I think the problem is different from what I thought at first. Which line is line 92? I&#39;m guessing it&#39;s<br /><span class="source-code"> <span class="k2">{</span>    <a href="http://www.allegro.cc/manual/d_list_proc" target="_blank"><span class="a">d_list_proc</span></a>, <span class="n">10</span>, <span class="n">40</span>, <span class="n">96</span>, <span class="n">48</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">0</span>, resolution_lister <span class="k2">}</span>,</span><br />in which case the solution would be to cast resolution_lister to (void *), like so:<br /><span class="source-code"> <span class="k2">{</span>    <a href="http://www.allegro.cc/manual/d_list_proc" target="_blank"><span class="a">d_list_proc</span></a>, <span class="n">10</span>, <span class="n">40</span>, <span class="n">96</span>, <span class="n">48</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">1</span>, <span class="n">0</span>, <span class="k2">(</span><span class="k1">void</span> <span class="k3">*</span><span class="k2">)</span>resolution_lister <span class="k2">}</span>,</span><br />You may also want to change the (char *) to (void *), as void * is what is actually the datatype of the dp field in the dialog struct and implicit casts to (void *) are illegal in ISO C++.</p><p>Also, you may want to check the forum mockup tagsm, see the <a href="http://www.allegro.cc/mockup.html">mockup is on</a> link above the message box.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 30 Jan 2004 15:33:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Whenever you get an error message like this, please mark the line indicated as the error (92 in this case).<br />Anyway, the solution is quite simple here. The dp member of the DIALOG struct is of type void*, not char*(*)(int, int*). This second type (in case you don&#39;t know) is a function pointer type, a pointer to a function with return type char* that takes one int and one int* argument. Cast the d_XXX to void* like this:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">{</span><span class="k2">(</span><span class="k1">void</span><span class="k3">*</span><span class="k2">)</span><a href="http://www.allegro.cc/manual/d_shadow_box_proc" target="_blank"><span class="a">d_shadow_box_proc</span></a>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">320</span>, <span class="n">200</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, <span class="n">0</span>, NULL <span class="k2">}</span>,
</pre></div></div><p>
This should compile just fine.</p><p>Oh, and <i>please</i> use code tags. Click &quot;mockup is on&quot; in case you don&#39;t know what these are.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 30 Jan 2004 15:40:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi,<br />Thanks for your help.<br />Your post helps a little bit.<br />Now i&#39;ve get an other error. <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>Can anybody help me again ?</p><p>C:\MinGW\source\carterrain\src&gt;make<br />gcc -c main.cpp -o main.o -O3<br />gcc -c glode.cpp -o glode.o -O3<br />gcc -c trig.cpp -o trig.o -O3<br />gcc -c geometry.cpp -o geometry.o -O3<br />gcc -c intro.cpp -o intro.o -O3<br />gcc -c car.cpp -o car.o -O3<br />gcc -c camera.cpp -o camera.o -O3<br />gcc -c skybox.cpp -o skybox.o -O3<br />gcc -c splash.cpp -o splash.o -O3<br />gcc -c timer.cpp -o timer.o -O3<br />gcc -c loop.cpp -o loop.o -O3<br />gcc -c controls.cpp -o controls.o -O3<br />gcc -c menu.cpp -o menu.o -O3<br />gcc main.o glode.o trig.o geometry.o intro.o car.o camera.o skybox.o splash.o ti<br />mer.o loop.o controls.o menu.o -o carterrain.exe -lagl -lalleg -lopengl32 -lglu3<br />2 -lode -mwindows<br />main.o(.text+0xab):main.cpp: undefined reference to `__gxx_personality_sj0&#39;<br />main.o(.text+0xbc5):main.cpp: undefined reference to `operator new[](unsigned)&#39;<br />main.o(.text+0xbdb):main.cpp: undefined reference to `operator new[](unsigned)&#39;<br />main.o(.text+0x1301):main.cpp: undefined reference to `__gxx_personality_sj0&#39;<br />main.o(.text$_ZN7CCameraC1Ev+0x1b):main.cpp: undefined reference to `__gxx_perso<br />nality_sj0&#39;<br />geometry.o(.text+0x1b):geometry.cpp: undefined reference to `__gxx_personality_s<br />j0&#39;<br />geometry.o(.text+0x59):geometry.cpp: undefined reference to `operator new[](unsi<br />gned)&#39;<br />geometry.o(.text+0x8b):geometry.cpp: undefined reference to `operator new[](unsi<br />gned)&#39;<br />geometry.o(.text+0xa8):geometry.cpp: undefined reference to `operator new[](unsi<br />gned)&#39;<br />geometry.o(.text+0x1ac):geometry.cpp: undefined reference to `operator delete[](<br />void*)&#39;<br />geometry.o(.text+0x27b):geometry.cpp: undefined reference to `__gxx_personality_<br />sj0&#39;<br />geometry.o(.text+0x2b9):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x2eb):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x308):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x40c):geometry.cpp: undefined reference to `operator delete[](<br />void*)&#39;<br />geometry.o(.text+0x4db):geometry.cpp: undefined reference to `__gxx_personality_<br />sj0&#39;<br />geometry.o(.text+0x521):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x5af):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x5cc):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x6d7):geometry.cpp: undefined reference to `operator delete[](<br />void*)&#39;<br />geometry.o(.text+0x79b):geometry.cpp: undefined reference to `__gxx_personality_<br />sj0&#39;<br />geometry.o(.text+0x7e1):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x86f):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x88c):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0x997):geometry.cpp: undefined reference to `operator delete[](<br />void*)&#39;<br />geometry.o(.text+0xa6e):geometry.cpp: undefined reference to `__gxx_personality_<br />sj0&#39;<br />geometry.o(.text+0xaf7):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0xb81):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0xb9e):geometry.cpp: undefined reference to `operator new[](uns<br />igned)&#39;<br />geometry.o(.text+0xf4a):geometry.cpp: undefined reference to `operator delete[](<br />void*)&#39;<br />geometry.o(.text+0x101e):geometry.cpp: undefined reference to `__gxx_personality<br />_sj0&#39;<br />geometry.o(.text+0x10a7):geometry.cpp: undefined reference to `operator new[](un<br />signed)&#39;<br />geometry.o(.text+0x1131):geometry.cpp: undefined reference to `operator new[](un<br />signed)&#39;<br />geometry.o(.text+0x114e):geometry.cpp: undefined reference to `operator new[](un<br />signed)&#39;<br />geometry.o(.text+0x14fa):geometry.cpp: undefined reference to `operator delete[]<br />(void*)&#39;<br />geometry.o(.text+0x15fb):geometry.cpp: undefined reference to `operator delete[]<br />(void*)&#39;<br />geometry.o(.text+0x1658):geometry.cpp: undefined reference to `operator delete[]<br />(void*)&#39;<br />geometry.o(.text+0x16bb):geometry.cpp: undefined reference to `operator delete[]<br />(void*)&#39;<br />geometry.o(.text+0x1718):geometry.cpp: undefined reference to `operator delete[]<br />(void*)&#39;<br />geometry.o(.text+0x1a7a):geometry.cpp: undefined reference to `__gxx_personality<br />_sj0&#39;<br />geometry.o(.text+0x1648):geometry.cpp: undefined reference to `operator delete[]<br />(void*)&#39;<br />geometry.o(.text+0x1708):geometry.cpp: undefined reference to `operator delete[]<br />(void*)&#39;<br />camera.o(.text+0x204):camera.cpp: undefined reference to `__gxx_personality_sj0&#39;</p><p>loop.o(.text+0x3b):loop.cpp: undefined reference to `__gxx_personality_sj0&#39;<br />loop.o(.text+0x95):loop.cpp: undefined reference to `operator new[](unsigned)&#39;<br />loop.o(.text+0x23a):loop.cpp: undefined reference to `operator delete[](void*)&#39;<br />loop.o(.text+0x28b):loop.cpp: undefined reference to `__gxx_personality_sj0&#39;<br />loop.o(.text+0x2e5):loop.cpp: undefined reference to `operator new[](unsigned)&#39;<br />loop.o(.text+0x48a):loop.cpp: undefined reference to `operator delete[](void*)&#39;<br />loop.o(.text+0x4ed):loop.cpp: undefined reference to `operator delete[](void*)&#39;<br />loop.o(.text+0x53d):loop.cpp: undefined reference to `operator delete[](void*)&#39;<br />c:/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libode.a(collision_kernel.o)(<br />.data$_ZTV6dxGeom+0x10):collision_kernel.cpp: undefined reference to `__cxa_pure<br />_virtual&#39;<br />c:/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libode.a(collision_space.o)(.<br />data$_ZTV7dxSpace+0x28):collision_space.cpp: undefined reference to `__cxa_pure_<br />virtual&#39;<br />c:/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libode.a(collision_space.o)(.<br />data$_ZTV7dxSpace+0x2c):collision_space.cpp: undefined reference to `__cxa_pure_<br />virtual&#39;<br />c:/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libode.a(collision_space.o)(.<br />data$_ZTV7dxSpace+0x30):collision_space.cpp: undefined reference to `__cxa_pure_<br />virtual&#39;<br />make: *** [carterrain.exe] Error 1</p><p><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /><img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Heinz Schmitz)</author>
		<pubDate>Fri, 30 Jan 2004 15:44:48 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>use g++, not gcc.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 30 Jan 2004 15:47:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi,<br />thanks for your help.<br />I&#39;ve changed it to g++ and now the compiling works. But the created *.exe file creates an error. hmmm. the original *.exe file works.</p><p>hmm. I think the only one who can help me here is the coder of these demo ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Heinz Schmitz)</author>
		<pubDate>Fri, 30 Jan 2004 15:50:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>use g++, not gcc.</p></div></div><p>
Or link with libstdc++.a (ie, inlude -lstdc++ on the command line).</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>But the created *.exe file creates an error.</p></div></div><p>
What error?</p><p>EDIT: Tobias, maybe we should posting at the same time? <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 30 Jan 2004 15:55:21 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Guess so.</p><p>You could give me a bit of detail on the error the exe creates. Does it crash on launch? Crash while running? Freeze? Reboot? GPF? Cause obscure behaviour in other apps / the os? If so, how? Throw error messages at you? If so, what are they? Can you manually shut down the exe (Alt-F4)? Kill it (via Ctrl-Alt-Del)?</p><p>And what&#39;s your system? compiler? allegro version?</p><p>Do the allegro examples compile &amp; execute well?</p><p>Oh wait: Have you recompiled allegro and allegrogl? If not, please do so.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 30 Jan 2004 15:57:28 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi,</p><p>now it works !;)<br />The exe file was in the wrong directory</p><p>Thanks all !
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Heinz Schmitz)</author>
		<pubDate>Fri, 30 Jan 2004 16:01:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
EDIT: Tobias, maybe we should posting at the same time? 
</p></div></div><p>
Hehe... we zitten dus in dezelfde tijdzone... GMT+1:00 (Amsterdam)...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 30 Jan 2004 21:43:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Tobias: He, grappig! Dat had ik nog niet gezien. Alleen staat in je profiel dat Den Haag op de Antillen ligt <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Fri, 30 Jan 2004 23:32:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Maybe he felt homesick and built his own tropical version of the Hague over there? <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (gnolam)</author>
		<pubDate>Fri, 30 Jan 2004 23:50:56 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Heinz, <br />Next time you post, can you:<br />Specify a more descriptive title<br />Use the mockup tags<br />Just list a few errors if there are lots all very similar<br />Say why it doesn&#39;t work or do what you expected.</p><p>Then it will be easier to help you!</p><p>Cheers<br />Pete
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Hull)</author>
		<pubDate>Sat, 31 Jan 2004 00:19:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Tobias: He, grappig! Dat had ik nog niet gezien. Alleen staat in je profiel dat Den Haag op de Antillen ligt 
</p></div></div><p>
hehe... typo, seekah weetah denkik.<br />Or do you call that a &quot;clicko&quot;, when you mis-click?
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Maybe he felt homesick...
</p></div></div><p>
No, not homesick. I&#39;m from Germany originally. But I could use a bit more Antillian weather over here right now...
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
...and built his own tropical version of the Hague over there? 
</p></div></div><p>
Working on it... at least as far as music goes...<br />click here for aural sunshine: [URL <a href="http://www.home.deds.nl/~tdammers/audio/bilongo.mp3">http://www.home.deds.nl/~tdammers/audio/bilongo.mp3</a>]<br />And before anyone starts nit-picking: Yes that song&#39;s from Cuba, yes Cuba is part of the Antilles, no Cuba is not part of the Netherlands Antilles.</p><p>Anyway, I could go and change it... but then it&#39;s kinda funny, so I&#39;ll leave it this way for a while...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Sat, 31 Jan 2004 00:37:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>hehe... typo, seekah weetah denkik.</p></div></div><p> <img src="http://www.allegro.cc/forums/smileys/cheesy.gif" alt=":D" />
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>Or do you call that a &quot;clicko&quot;, when you mis-click?</p></div></div><p>
Probably not. A while back, Matthew updated the timezone code and then everyone in the Netherlands was shifted to the Netherlands Antilles. Must have been the largest and fastest mass-emmigration ever.<br />Not sure if it affected others too though.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 31 Jan 2004 02:25:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, I live close to the sea anyway, so might as well call it the Caribbean, and consider Frans Bauer a samba artist...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Sat, 31 Jan 2004 02:50:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>might as well call it the Caribbean, and consider Frans Bauer a samba artist... </p></div></div><p>

You have a vivid imaginiation.<br /><img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 31 Jan 2004 20:43:20 +0000</pubDate>
	</item>
</rss>
