Subject: Re: dumb g++ linker question
To: None <kent@goatnospamhill.org>
From: None <rmcm@compsoft.com.au>
List: port-i386
Date: 02/08/2001 07:26:22
- man ld.so explains the dynamic linking strategy and the role of
LD_LIBRARY_PATH
- ldd <executable> will show the embedded paths in your executable.
- adding -t to your linker args (or -Wl,-t to compiler args) will
annotate the processing of input files by ld.
Kent Polk writes:
> On 5 Feb 2001 14:15:00 -0600, Nick Hudson wrote:
> >Kent Polk wrote:
> >>
> >> I'm trying to compile qHolo on a 1.5 system and appear to have problems
> >> getting g++ to locate std libraries. The qHolo Makefile results are listed
> >> below, but the libraries appear to be available:
> >>
> >> $ ll /usr/X11R6/lib/libXmu.so*
> >> -L/usr/X11R6/lib -L/usr/X11R6/qt2/lib -lqt -lXext -lX11 -lm
> ...
>
> >Try using -Wl,-rpath or (say it quietly) libtool.
>
> Tried all that except libtool. I finally started playing around
> with explicitly naming and rearranging the libraries and managed
> to get it to link. Can't get it to run without setting my
> LD_LIBRARY_PATH though.
>
> Now I've never had to set my LD_LIBRARY_PATH on NetBSD before and
> everything works fine until this. Actually, that's always puzzled
> me... I've always had to set that on unix systems. How does NetBSD
> deal with this?
>
> Thanks
--
Rex McMaster