This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Re: -Bstatic & -shared problems / some solution


At 13:54 16.04.2002, bert hubert wrote:
>[post from a non-subscriber, please cc. thanks]
>
>On Tue, Apr 16, 2002 at 12:59:42PM +0200, bert hubert wrote:
>
> > So I try this:
> >
> > g++ -L/opt/postgresql/lib
> > -Wl,-Bstatic -lssl -lcrypt -lcrypto -lpq++ -lpq -Wl,-Bdynamic -Wl,-soname
> > -Wl,libgpsqlbackend.so.0 -shared  -o libgpgsqlbackend.so pgsqlbackend.o
>
>If I execute this:
>
>ar x /opt/postgresql/lib/libpq++.a $(ar t /opt/postgresql/lib/libpq++.a)
>ar x /opt/postgresql/lib/libpq.a $(ar t /opt/postgresql/lib/libpq.a)
>
>And replace the 'pgsqlbackend.o' above by '*.o', I get a working .so
>that does not depend on any pgsql .so's.

Why should the linker extract anything at all from these libraries? You 
listed them in front of your object file! Change the order of your command 
line.

Franz.


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