This is the mail archive of the binutils@sourceware.cygnus.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]

Re: stupid ld tricks


On Wed, Jun 21, 2000 at 06:55:47PM -0400, Michael Sterrett -Mr. Bones.- wrote:
> I'm trying to use the -Bstatic -Bdynamic flags to ld to link certain
> libraries statically to my application and others dynamically.
> 
> I had hoped something like this would work:
> 
>     cc -o app.o -c app.c
>     ld -o app app.o -Bstatic -la -Bdynamic -lb -lc
> 

Never call ld directly unless you know what you are doing. Use
gcc and -Wl,-Bstatic -la -Wl,-Bdynamic:

# gcc -o app app.o -Wl,-Bstatic -la -Wl,-Bdynamic -lb

H.J.

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