This is the mail archive of the gcc-bugs@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: Getting Started with gcc


On Sep 21, 2001, John Kennedy <johnkennedy@allentek.com> wrote:

> I though ld would come with the package.

Nope.  gcc is a compiler collection.  The assembler and the linker are
part of GNU binutils, a separate project.

>     gcc -c myprog.c
>     ld myprog.o

> It gives my the familiar error that it can't find printf.

You should get the C library linked in, with -lc.  But you should
really get gcc to find ld, because then it will not only do this for
you, but will also link in its own support libraries and object files,
without which you may run into further problems.

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