Linking libraries with relative pathnames?
Reiner Suikat
Reiner.Suikat@dlr.de
Mon Nov 27 08:37:00 GMT 2000
Hello,
I'm running into a problem trying to link with some shared libraries without
having absolute paths defined. The idea is that if I had some means of
sharing build target definitions among users, users could then link with
their own local copies of certain libraries. Unfortunately, at this time
that is not possible (I "share" build target information by copying the
entire *.proj files, which works fine) since libraries can only be specified
with full absolute pathname. My first idea fo just putting the libs I'm
using in an environment variable and placing that in the Link Flags fields
works fine on Linux, but not on SGI.
The problem here is that the link line now first lists the libs and then the
main .o file, in which case the SGI linker does not reolve any symbols from
the main program. (It only ssearches each library once for the symbols that
are unknown at that time). The gnu linker has no proble here.
So, here is the question in short:
Is there any way to get a link line similar to
ld Flags -o something xx.o ${LIBS}
so that the libs (with relative path) come after the main object file?
Thanks for any help and keep up the good work, I love sourcenav!!!
Greetings
Reiner
--
Reiner Suikat
Institute of Flight Guidance
German Aerospace Center (DLR)
More information about the Sourcenav
mailing list