[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: static libs ... again



Linus Walleij wrote:
>> gcc --shared/--static.
> 
> These are real messy to use, as far as I know it is an all-or-nothing
> flag to the linker, --static really links all libs statically (if the
> static versions are available).
> 
> What one would normally like to do would be:
> gcc ... -lfoo --static -lbar --shared -lbaz
> 
> assuming switches progress from left to right to flag that one (and only
> one) library should be linked in statically.
> 
> This does not work, 

Try this (or something close to it) instead:

gcc ... -lfoo -Wl,--static -lbar -Wl,--shared -lbaz

-- Rex


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]