On Mon, 2008-05-26 at 00:11 -0400, deoxy wrote:
> Hello.
> 
> apue.h is OK I take this of http://safari.oreilly.com/0201433079/app02
> and this is in my folder.
> The err_quit is in line 108 "void err_quit(const char *, ...)i;"
> err_dump and err_sys are similar.
> 
> regards.
> 
> Dmitri.
> 
> On Mon, May 26, 2008 at 09:11:51AM +0530, Amarendra Godbole wrote:
> > > $cc F3_10.c
> > > /tmp//ccnsuA79.o(.text+027): In function 'main':
> > > :undefined reference to 'err_quit'
> > > /tmp//ccnsuA79.o(.text+0x74): In fuction 'main':
> > > :undefined reference to 'err_sys'
> > > /tmp//ccnsuA79.o(.txt+0xdf): In functiion 'main':
> > > :undefined reference to 'err_dump'
> > > collect2: ld returned 1 exit status
> > >
> > > The source is:
> > >
> > >
> > > #include "apue.h"
> > 
> > This is the clue - where do you think is apue.h? Take a look at the
> > last few pages of the book, and you will see.
> > 
> > -Amarendra

It might be that you would prefer to start by learning more about C and
your compiler first, before unix programming in C.

Assuming that 'i;' at the end of the line isn't actually there, you are
probably not passing an object module to the linker. Aside from letting
the precompiler find apue.h, you also have to compile the code that
implements those functions and link it with the object module compiled
from your FE_10.c, or compile them together as someone else suggested.

Kendall

Reply via email to