Quote:> well I thought someone might have read this book
Quite a few of us, I suppose. Welcome to the club. ;-)
Quote:> In function main:
> undefined reference to 'err_quit'
> But it is actually in the header file and the program is able to use
> it.
Including a header does not mean your program can use the function.
It only means your program will compile. It won't link though - for
that you need to link the actual definition (as opposed to
declaration) of the function. Get the code for err_quit() [IIRC, it is
available on the net], or type it in yourself, and link it in. Check
your compiler/linker documentation to see how to do it. On Linux with
gcc the easiest way is, assuming the function definition is in
ourerr.c, and your program is in prog.c, and all that + ourhdr.h is in
the current directory:
$ gcc prog.c ourerr.c
Quote:> Could it be, that this problem occurs because I am running Linux?
Nothing to do with Linux. It's not an OS question at all, it's C.
--
"... We work but wit, and not by witchcraft;
And wit depends on dilatory time." [Shakespeare]