Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Mar 2011 09:28:02 -0400
From:      Jim <stapleton.41@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   opening a shared object / failing with Undefined Symbol.
Message-ID:  <AANLkTi=tyuVJBDN7qRLe7O_a3i3d09sbEis-zoCH14tY@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I have an application that opens two .so files with dlopen(3):
  /usr/local/lib/libag_core.so
  /usr/local/lib/libag_gui.so

Both files exist
Running nm(1) against each produces a lot of output, showing all the
symbols I know to exist in each library.

My application gets a null return from dlopen on the libag_gui.so.

dlerror produces the following string:
  "/usr/local/lib/libag_gui.so Undefined symbol "agTimingLock"

$ nm /usr/local/lib/libag_gui.so | grep agTiming
                 U agTimingLock

I'm guessing that means that agTimingLock is used in that library but
not defined?

$ nm /usr/local/lib/libag_core.so | grep agTiming
0000000000141c00 B agTimingLock

And this would mean that it is defined in libag_core.so?

Given that libag_core.so gets loaded first, does anyone have any
suggestions on how to fix such an issue? (Note: I didn't write this
library, I did compile/install it)

Thanks,
-Jim Stapleton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=tyuVJBDN7qRLe7O_a3i3d09sbEis-zoCH14tY>