PDA

View Full Version : Confusing Shared Library Error



IdioticCreation
12-13-2007, 10:24 PM
I'm developing a game using FMOD sound library. Specifically fmodex 4.10.01. I'm using Code::Blocks compiler. Everything compiles fine, and when I click "Run" in the compiler it will even run just fine. But if I attempt to run it through the terminal, I get an error saying it could not find the .so.

Here is the specific error:
error while loading shared libraries: ../../../../../usr/lib/libfmodex.so: cannot open shared object file: No such file or directory

libfmodex.so is defiantly in /usr/lib. However I never officially installed fmod, I just downloaded the API and did a "gksu nautilus" and copied the libs and includes to /usr.

I just don't get why it will run through C::B but not by its self.

Please help,
David

Salem
12-14-2007, 12:29 AM
Can you find a way of removing all those ../ from the relative pathname?

The fact that it seems to work sometime suggests that it's very sensitive to the "current directory", like anything which is 5 levels deep.

amit_sahrawat
12-14-2007, 12:44 AM
try specifying the Library path by using -L flag to gcc

IdioticCreation
12-14-2007, 03:37 PM
Can you find a way of removing all those ../ from the relative pathname?

The fact that it seems to work sometime suggests that it's very sensitive to the "current directory", like anything which is 5 levels deep.

That was the problem. Thanks!