<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Newbie help - program can&#39;t run correctly</title>
		<link>http://www.allegro.cc/forums/view/590109</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 18 Feb 2007 00:05:09 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Hi! I&#39;m new here, i&#39;m just trying to begin with Allegro, and I have compiled an easy program:
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="p">#include &lt;allegro.h&gt;</span></td></tr><tr><td class="number">2</td><td>&#160;</td></tr><tr><td class="number">3</td><td><span class="k1">using</span> <span class="k1">namespace</span> std<span class="k2">;</span></td></tr><tr><td class="number">4</td><td>&#160;</td></tr><tr><td class="number">5</td><td><span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span><span class="k2">{</span></td></tr><tr><td class="number">6</td><td>&#160;</td></tr><tr><td class="number">7</td><td>   <a href="http://www.allegro.cc/manual/allegro_init" target="_blank"><span class="a">allegro_init</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">8</td><td>  <a href="http://www.allegro.cc/manual/install_keyboard" target="_blank"><span class="a">install_keyboard</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">9</td><td>  <a href="http://www.allegro.cc/manual/set_gfx_mode" target="_blank"><span class="a">set_gfx_mode</span></a><span class="k2">(</span>GFX_AUTODETECT , <span class="n">640</span>, <span class="n">480</span>, <span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">10</td><td>  <a href="http://www.allegro.cc/manual/putpixel" target="_blank"><span class="a">putpixel</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>,<span class="n">160</span>,<span class="n">100</span>,<span class="n">30</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">11</td><td>&#160;</td></tr><tr><td class="number">12</td><td>  <a href="http://www.allegro.cc/manual/allegro_exit" target="_blank"><span class="a">allegro_exit</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">13</td><td>  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>&#160;</td></tr><tr><td class="number">15</td><td><span class="k2">}</span></td></tr><tr><td class="number">16</td><td><a href="http://www.allegro.cc/manual/END_OF_MAIN" target="_blank"><span class="a">END_OF_MAIN</span></a><span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr></tbody></table></div></div><p>

I do<i> g++ allegroworld.cpp -o allegroworld `allegro-config --libs`</i> and it compile with no error, but when I do ./allegroworld i see an error:</p><div class="source-code snippet"><div class="inner"><pre>alx@ubuntu:~<span class="k3">/</span>Desktop<span class="k3">/</span>projects$ .<span class="k3">/</span>allegroworld
.<span class="k3">/</span>allegroworld: symbol lookup error: .<span class="k3">/</span>allegroworld: undefined symbol: _install_allegro_version_check
</pre></div></div><p>

I have search the forums and i have seen in a topic that maybe i have the program compiled with 4.2.1, and run against a 4.2.0 library.</p><p>So I do &lt;i&gt;$ ls <i>usr/lib/liballeg*</i> and $ &lt;i&gt;ls <i>usr/local/lib/liballeg*</i>, and this is what I see:</p><div class="source-code snippet"><div class="inner"><pre>alx@ubuntu:<span class="k3">/</span>home<span class="k3">/</span>alx<span class="k3">/</span>Desktop<span class="k3">/</span>projects# ls <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg<span class="k3">*</span>
<span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg-4.2.0.so  <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg.a  <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg.so.4.1  <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg.so.4.2
alx@ubuntu:<span class="k3">/</span>home<span class="k3">/</span>alx<span class="k3">/</span>Desktop<span class="k3">/</span>projects# ls <span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>lib<span class="k3">/</span>liballeg<span class="k3">*</span>
<span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>lib<span class="k3">/</span>liballeg-4.2.1.so  <span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>lib<span class="k3">/</span>liballeg.so.4.2  <span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>lib<span class="k3">/</span>liballeg_unsharable.a
</pre></div></div><p>

<b>So i think that the problem is because i have the 4.2.0 and 4.2.1.</b> How can I fix it?</p><p>THX I have search but i haven&#39;t find any solution. Sorry for my bad english, i&#39;m from europe. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (habeas corpus)</author>
		<pubDate>Sat, 17 Feb 2007 04:12:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
Do a make clean or make uninstall in the 4.2.0 directory and then a make install in the 4.2.1 directory?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Sat, 17 Feb 2007 04:15:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It looks like you installed 4.2.0 from your distro&#39;s package manager, so uninstall it through there as well.</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Sorry for my bad english, i&#39;m from europe. <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />
</p></div></div><p>You crazy Europeans with your colours and labouring and defence and other such malarkey!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 17 Feb 2007 04:22:54 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>OK guys I have tried to make clean and make uninstall but there aren&#39;t any makefile at that path and there are a lots of files in the directory :S</p><div class="quote_container"><div class="title">name said:</div><div class="quote"><p>
You crazy Europeans with your colours and labouring and defence and other such malarkey!
</p></div></div><p>

Sorry but what&#39;s a malarkey?</p><p>Thx all.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (habeas corpus)</author>
		<pubDate>Sat, 17 Feb 2007 04:49:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
It&#39;s an old-fashioned english slang word.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Sat, 17 Feb 2007 04:55:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>ok thx, Richard.</p><p>And how can I uninstall the allegro 4.2.0? I have already tried make clean and make uninstall but there aren&#39;t makefiles...
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (habeas corpus)</author>
		<pubDate>Sat, 17 Feb 2007 05:06:24 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>
You might need someone who runs a Linux OS, I only use Windows I&#39;m afraid.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Richard Phipps)</author>
		<pubDate>Sat, 17 Feb 2007 05:10:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
It looks like you installed 4.2.0 from your distro&#39;s package manager, so uninstall it through there as well.
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 17 Feb 2007 06:20:46 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, I have already done it, but there&#39;s a new problem, after uninstall i execute the program and i see a new error:</p><p><span class="source-code">.<span class="k3">/</span>allegroworld: error <span class="k1">while</span> loading shared libraries: liballeg.so.4.2: cannot <a href="http://www.delorie.com/djgpp/doc/libc/libc_600.html" target="_blank">open</a> shared object file: No such file <span class="k1">or</span> directory</span></p><p>So I go to the packet manager in order to install allegro 4.2.1 but I don&#39;t see it, there is only the 4.2.0 and 4.1.15 version :/ And I have updated the packet manager but there appears the same versions.</p><p><img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (habeas corpus)</author>
		<pubDate>Sat, 17 Feb 2007 16:55:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Make sure every version of Allegro is uninstalled in your package manager. Then go to the Allegro 4.2.1 directory and make install again (as root of course). Finally, recompile your program.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sat, 17 Feb 2007 22:22:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thx, question solved.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (habeas corpus)</author>
		<pubDate>Sat, 17 Feb 2007 23:29:49 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Sorry for my bad english, i&#39;m from europe.
</p></div></div><p>
So are the English. Granted, their English isn&#39;t <i>that</i> good... <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Finally, recompile your program.
</p></div></div><p>
Not nescessary; 4.2.0 and 4.2.1 are backward binary compatible.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sat, 17 Feb 2007 23:57:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Not nescessary; 4.2.0 and 4.2.1 are backward binary compatible.
</p></div></div><p>Yes, well, I read this error and figured a recompile would fix. Looks like it did <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" /></p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
</p><pre>./allegroworld: error while loading shared libraries: liballeg.so.4.2: cannot open shared object file: No such file or directory</pre><p>
</p></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CGamesPlay)</author>
		<pubDate>Sun, 18 Feb 2007 00:01:43 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It means Allegro is not installed. Installing 4.2.1 would fix it.<br />Recompiling doesn&#39;t hurt anyway. <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Evert)</author>
		<pubDate>Sun, 18 Feb 2007 00:05:09 +0000</pubDate>
	</item>
</rss>
