This is the mail archive of the 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 / example

On Tue, Apr 16, 2002 at 02:22:40PM +0200, Franz Sirl wrote:

> >Because as far as I can see, these should be identical. The difference:
> archive != object file for the linker. Again, you have misordered your 
> command line, there is no object file listed in front of the libraries, so 
> no need for the linker to extract anything from the libraries cause there 
> is no consumer (yet). Try:

Ok - my apologies. I've learned a valuable thing today - the order of
objects on the commandline matters.

> $ g++ pgsqlbackend.o -L/opt/postgresql/lib -lssl -lcrypt 
> -lcrypto  -Wl,-Bstatic -lpq++ -lpq -Wl,-Bdynamic -Wl,-soname 
> -Wl, -shared -o
> BTW, this is quite off-topic here, these are linker basics that have 
> nothing to do with binutils in particular.

This fixes the problem completely and I am grateful and will shut up now. 


bert hubert

--          Versatile DNS Software & Services                              the dot in .tk           Linux Advanced Routing & Traffic Control HOWTO

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