tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: warning about conflicting libraries from base and pkgsrc
Dieter Baron wrote:
> What does the following command produce (add /usr/lib to the front
> of the link-time library search path)?
>
> $ gcc -I/usr/pkg/include -g -O2 -L/usr/lib -L/usr/pkg/lib -lcurl
> -L/usr/pkg/lib
> -Wl,-R/usr/pkg/lib -lidn -lssl -lcrypto -lz -o esniper auction.o
This works, no more warnings and the executable file needs only
libz.so.0.
I didn't try this before because the gcc manual page says for option
"-l":
The directories searched include several standard system directo-
ries plus any that you specify with -L.
I read this "plus" as "searched after the standard directories".
Now that I think about it, I should have paid more attention to what the
man page for ld has to say about option "-l":
The directories are searched in the order in
which they are specified on the command line. Directories speci-
fied on the command line are searched before the default directo-
ries. All -L options apply to all -l options, regardless of the
order in which the options appear.
Thanks for the hint,
ciao
Klaus
Home |
Main Index |
Thread Index |
Old Index