This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linking a third-party library with my own library


Hi,

I am trying to link a third-party shared object library (libpapi.so) with my
own library .so file. The libpapi.so file lives in a different directory
than my library. I am running the following command:

g++ -shared [other switches] -L/path-to-libpapi [more switches] -lpapi -o
mylibrary.so mylibrary.o

The command executes without errors. However, when I run 'ldd mylibrary.o' I
get:

libpapi.so.3 => not found

I can see that libpapi.so.3 exists under /path-to-libpapi. Needless to say,
when I try to load my library it complains about not being able to find
libpapi.so.3.

What am I missing?

Thank you,

Rodrigo



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]