[LCP]statically linking argtable and other libraries

Jean-Daniel Pauget jd at disjunkt.com
Thu Jul 15 20:36:02 UTC 2004


On Wed, 14 Jul 2004, Christopher Baus wrote:

> > Some time before, Jean-Daniel Pauget wrote:
> >     in some Makefile.am I had this line :
> >
> > libmylib_la_LDFLAGS = -version-info -Xlinker --export-all-symbols
> >
> >     and the switch "--export-all-symbols" was transmitted to te linker at
> >     building the lib.
> >
> >     maybe this can help ?
> Yes this is exactly the problem.  I pass the following the libtool:
>
> -static -llibarg2 -lsomeotherlib
>
> and libtool doesn't pass the -static to the linker.  I think the problem
> is the libraries need to be built with libtool themselves.  The easy
> solution as you say is to bypass libtool all together with the -W1 or
> -Xlinker switch as you say.
>
> Then the question is:  Why use libtool at all?

    I admit there are days I ask myself the same question, but the "Xlinker"
    is not related to libtool, rather to gcc, and I always realized yet
    that libtool helped me having a strong skeleton for generating
    cross-platforms builds.
    And libtool gets better with time.

--
    Jean-Daniel Pauget

    Tél: +33 (0) 676 952 746
    2, rue André PELCA
    50580 Denneville-Plage
    France



More information about the linuxCprogramming mailing list