static libs ... again
Rex Dieter
rdieter at math.unl.edu
Wed Feb 22 11:48:51 UTC 2006
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
More information about the fedora-extras-list
mailing list