This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Getting Started with gcc
- To: John Kennedy <johnkennedy at allentek dot com>
- Subject: Re: Getting Started with gcc
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 29 Sep 2001 05:49:56 -0300
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <3BABC77C.514043C@allentek.com>
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