|
From: Philip W. <phi...@pr...> - 2003-09-25 00:17:56
|
> I don't think you would need a "dummy" shared library. I think > that as long as you don't explicitly use -static in the link line > that the glibc will be linked shared anyway providing the one > required shared object. My code only links to specified static > libraries, so the system libraries must get linked as .so. If you still want static linking, you can ask gcc to link certain libraries statically. Try -Wl,-Bstatic -lmyLibrary1 -lotherLibrary -Wl,-Bdynamic Just make sure you end with -Wl,-Bdynamic so that libc is dynamically linked. Philip. |
|
From: Olly B. <ol...@su...> - 2003-09-25 08:52:49
|
On Thu, Sep 25, 2003 at 10:16:51AM +1000, Philip Walford wrote:
> If you still want static linking, you can ask gcc to link certain
> libraries statically. Try
>
> -Wl,-Bstatic -lmyLibrary1 -lotherLibrary -Wl,-Bdynamic
>
> Just make sure you end with -Wl,-Bdynamic so that libc is dynamically
> linked.
Neat - I think this is worth adding to the relevant FAQ answer.
Nick: If you do apply my patch, I'd suggest adding a note pointing the user
to the relevant FAQ entry.
Cheers,
Olly
|