Thread: Confusing Shared Library Error

  1. #1
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229

    Confusing Shared Library Error

    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
    Last edited by IdioticCreation; 12-13-2007 at 10:28 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    15
    try specifying the Library path by using -L flag to gcc

  4. #4
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    Quote Originally Posted by Salem View Post
    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!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting other processes class names
    By Hawkin in forum Windows Programming
    Replies: 3
    Last Post: 03-20-2008, 04:02 PM
  2. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  3. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  4. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 09:23 PM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM