This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ld 'problem'


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]