ld 'problem'

Alexandre Oliva aoliva@redhat.com
Wed Dec 6 08:54:00 GMT 2000


On Dec  6, 2000, Igmar Palsenberg <i.palsenberg@jdimedia.nl> wrote:

> However, this is a no go. Anyone an idea what I'm missing here ??

> I I replace the .a file with the names of all .o files in those archive it
> starts working... I'm totally lost here.

When you link with a static library, only symbols whose definitions
are being looked for will be pulled into the resulting executable or
shared library.  If you've got GNU ld, you may enclose the libraries
you want to link as a whole within -Xlinker -whole-archive and
-Xlinker -no-whole-archive.  A few other linkers offer similar
features with different command-line options.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


More information about the Gcc-help mailing list