Mail Archives: djgpp/1999/01/27/17:15:54
Stuart Hall wrote:
>
> On Tue, 26 Jan 1999 13:09:10 -0800, Marvin G Wise Jr
> <mgwise AT seidata DOT com> so kindly spent valuable time writing:
>
> >
> >Well, if this is the function prototype in your header file then it
> >should have a semicolon at the end...
> >
> > char *getsafe(char *buffer, int count);
> >
>
> Ok, I tried this, and got a few more errors. Now my program looks
> like this, both modules compile just fine -- but when the linker gets
> to them it gives me an error:
>
> creating multiple.exe:
> Error: getsafe.o: In function 'getsafe':
> getsafe.c(8): Error multiple definition of 'getsafe'
> 0:getsafe.c(8): Error first defined here.
I cannot reproduce your diagnostic. The code you posted should be fine
except that
1) main.c needs to #include <stdio.h>
2) the final line (actually every line) should be terminated with a
'\n'.
--
Martin Ambuhl (mambuhl AT earthlink DOT net)
Note: mambuhl AT tiac DOT net will soon be inactive
- Raw text -