[LCP]statically linking argtable and other libraries

Jean-Daniel Pauget jd at disjunkt.com
Thu Jul 15 07:17:01 UTC 2004


On Thu, 8 Jul 2004, Christopher Baus wrote:

>
> >
> >   Does the -static come before or after the -largtable2?  ld args are
> > context
> > sensitive.  You may want to check the output of gcc -v to make sure the
> > linker
> > (collect2) is getting -static before any -l's.
> >
> > 								- Steve
> The problem is with libtool.  It seems to be removing the -static switch
> from the link command.

    I must say I don't fully understand your problem, but, when you speak
    about libtool removing some args you expected to be transmitted to the
    linker, I just remember having struggled with that and finished using
    the "-Xlinker" switch which is usefull to force transmiting some
    special flag to the linker.
    my own case looked like that :
    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 ?


--
    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