linking problems with shared objects

Michael auinger@mpie.de
Tue Oct 2 12:17:00 GMT 2012


Hi,

I have some troubles with file linking on my PC (AMD x64, gcc 4.6, UBUNTU
12.04).
Actually I have a small routine which links two software programmes together
which worked fine during the last 3 years. But when installing a new
programme version (due to a new license), I got some errors.

The self written c-file has been compiled into an object code (program.o) as
such:
$ gcc -c -fPIC -I/PATH -I/PATH1 program.c

Further, the shared object is made and connected to the other so-libraries
(libfile1.so, ...) as such:
$ gcc -shared program.o -o program.so -L/PATH2 -L/PATH -Wl,-rpath=/PATH
-Wl,-rpath=PATH2 -lfile1 -lfile2 -lfile3

It compiles without error messages, but when I try to check if everything is
linked properly, it gives me this:
$ ld program.so
ld: warning: libsvml.so, needed by /PATH2/libfile3.so, not found (try using
-rpath or -rpath-link)
ld: warning: libimf.so, needed by /PATH2/libfile3.so, not found (try using
-rpath or -rpath-link)
ld: warning: libguide.so, needed by /PATH2/libfile3.so, not found (try using
-rpath or -rpath-link)
ld: warning: libirc.so, needed by /PATH2/libfile3.so, not found (try using
-rpath or -rpath-link)
ld: warning: libcxaguard.so.5, needed by /PATH2/libfile3.so, not found (try
using -rpath or -rpath-link)
ld: warning: cannot find entry symbol _start; not setting start address

Its strange to me since the directory is given in the gcc syntax and the
files are definitely there. So I can not figure out where the problem is,
but I honestly have to admit that I am not an expert.

Any help is most welcome!
Thanks in advance,
Michael




--
View this message in context: http://gcc.1065356.n5.nabble.com/linking-problems-with-shared-objects-tp874364.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list