There's also a -static-libgcc flag which can help. Adding in the full library 
name including .a for the static libraries is the only sure-fire way of doing 
it I've found.

Don't you just love dependencies in an OS project (: Or release for thousands 
of distros of course...

Steve
 
On Fri, 28 Mar 2008 11:39:35 +1300
Aidan Gauland <[EMAIL PROTECTED]> wrote:

> Hello,
> 
>   I'm trying to edit an existing Makefile to link to some libraries 
> statically,
> and some dynamically (no, I'm not doing this because I'm a control freak, it's
> for an open source project).  I looked up the -static option in the ld man
> page, and it says: "You may use this option multiple times on the command
> line: it affects library searching for -l options which follow it."
> However if I put -static AFTER the -l options for the libraries I want to link
> to dynamically, and BEFORE the ones I want to link to statically, I get some
> linking errors, which is the same as what I get when I put -static before ALL
> of the -l options.
> 
>   Anyone here able to give advice on this?  I know this is a Linux USERS list,
> but I hope this is simple enough to not be TOO off topic.
> 
> Thanks,
> Aidan
> 
> 

Attachment: pgpyl0APBx8IO.pgp
Description: PGP signature

Reply via email to