<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Linux newbie - symbol lookup error?</title>
		<link>http://www.allegro.cc/forums/view/588905</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 06 Dec 2006 11:19:52 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well, I just installed Linux (Fedora Core 6) for the first time and am learning how it all works (so remember... talk dumb). Anyway, I have installed allegro, can compile stuff and everything, but when I go to run any program it gives me this error. This is with the exhello example, but it does it with everything.</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">[</span>root@localhost examples<span class="k2">]</span># .<span class="k3">/</span><a href="http://www.allegro.cc/manual/exhello" target="_blank"><span class="a">exhello</span></a>
.<span class="k3">/</span>exhello: symbol lookup error: .<span class="k3">/</span>exhello: undefined symbol: _install_allegro_version_check
</pre></div></div><p>

Being a Linux newbie, I have no idea what to do. Any help would be appreciated!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Craig Harrison)</author>
		<pubDate>Tue, 05 Dec 2006 09:45:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Well first of all Id say dont compile and run things as root. Only use root to install things and then only use &#39;sudo&#39;, not &#39;su&#39;.</p><p>I vaguelly recall seeing that error before but can&#39;t quite remember what it was about. I think you are running with a different version of allegro than you compiled with. Did you install Allegro yourself? If you run these two commands what do you see?</p><div class="source-code snippet"><div class="inner"><pre>$ ls <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg<span class="k3">*</span>
<span class="k1">and</span>
$ 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>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kazzmir)</author>
		<pubDate>Tue, 05 Dec 2006 09:54:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You will get this error if you have a program compiled with 4.2.1, run against a 4.2.0 library.  Probably you have 4.2.0 installed on your system.  Run &quot;ldd exhello&quot; to see which library exhello is picking up.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Tue, 05 Dec 2006 09:58:27 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ah, ok, I had two versions installed. I did one with yum and one manually.</p><p>I uninstalled the yum 4.2.0 one and now just have 4.2.1 installed.</p><p>Now when I go to run exhello (NOT as root <img src="http://www.allegro.cc/forums/smileys/wink.gif" alt=";)" />):</p><div class="source-code snippet"><div class="inner"><pre>.<span class="k3">/</span>exhello: 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
</pre></div></div><p>

here is this:</p><div class="source-code snippet"><div class="inner"><pre><span class="k2">[</span>Craig@localhost ~<span class="k2">]</span>$ ls <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg<span class="k3">*</span>
ls: <span class="k3">/</span>usr<span class="k3">/</span>lib<span class="k3">/</span>liballeg<span class="k3">*</span><span class="k2">:</span> No such file <span class="k1">or</span> directory

<span class="k2">[</span>Craig@localhost ~<span class="k2">]</span>$ 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_unsharable.a
<span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>lib<span class="k3">/</span>liballeg.so.4.2
</pre></div></div><p>

it looks to me like the file is there... is it looking in the wrong place?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Craig Harrison)</author>
		<pubDate>Tue, 05 Dec 2006 10:17:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In your .bashrc add a line like this
</p><div class="source-code snippet"><div class="inner"><pre>$ vi ~<span class="k3">/</span>.bashrc
<span class="k1">export</span> LD_LIBRARY_PATH<span class="k3">=</span>$LD_LIBRARY_PATH:<span class="k3">/</span>usr<span class="k3">/</span>local<span class="k3">/</span>lib
</pre></div></div><p>
Replace vi with your favorite editor, like nano or pico. Someone is going to come along and say you can edit /etc/ld.so.conf but I think this is less noob friendly.</p><p>After adding that line to your bashrc restart the terminal program and run exhello.</p><p>What this does is add /usr/local/lib to the list of directories linux looks in when it goes to run a program. Since allegro is a shared library it is loaded at runtime. LD_LIBRARY_PATH is one way to tell the run-time system where things are located.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (kazzmir)</author>
		<pubDate>Tue, 05 Dec 2006 10:24:57 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It works! Thanks a bunch!</p><p>Is there any way to do it so that other people I give the programs to don&#39;t have to do this? Something like in Windows giving them the dll with the program?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Craig Harrison)</author>
		<pubDate>Tue, 05 Dec 2006 10:32:25 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yes. Compile statically.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Milan Mimica)</author>
		<pubDate>Tue, 05 Dec 2006 17:31:11 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok, well, I must be doing something wrong here.</p><p>This works fine:<br />g++ -o tri_linux main.cpp `allegro-config --libs`</p><p>But when I try to staticlly link them:<br />g++ -o tri_linux main.cpp `allegro-config --static`</p><p>it says:<br />/usr/bin/ld: cannot find -lalleg<br />collect2: ld returned 1 exit status</p><p>I tried finding -lalleg and pasting it into /usr/bin/ld, but I couldn&#39;t find it anywhere. I&#39;m sure it&#39;s something simple, but I&#39;m not sure what to do.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Craig Harrison)</author>
		<pubDate>Wed, 06 Dec 2006 11:00:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, you&#39;ll have to rebuild allegro with the static libs enabled. By default only the dynamic lib is built.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 06 Dec 2006 11:03:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>call make uninstall or make clean or something first, or can I just install static libaries and leave the dynamic ones from before?</p><p>Then su -c &#39;make install &lt;something?&gt;&#39;</p><p>Could someone spell it out for me, please? <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Craig Harrison)</author>
		<pubDate>Wed, 06 Dec 2006 11:07:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The unix build docs spell it out for you <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Wed, 06 Dec 2006 11:08:06 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Ok got it. Thanks! That should be the last of my questions (for a little while).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Craig Harrison)</author>
		<pubDate>Wed, 06 Dec 2006 11:19:52 +0000</pubDate>
	</item>
</rss>
