Mail Archives: djgpp/1997/09/20/11:45:06
At 04:43 9/19/1997 -0500, news.champaign.pdnt.com wrote:
>
>
>
>Well...
>there was this keen book on advanced C that I wanted to buy, yet when I
>downloaded the "ANSI C" source code, it wouldnt compile in djgpp...
>i keep getting this freaky error... it goes a little somethin like this-
>
>c:/djgpp/lib\crt0.o(.data+0x92):crt0.s: Undefined refernce to 'main'
>c:/djgpp/lib/libc.a(crt1.0*other crap*: Undefined reference to 'main'
>
>but it isnt *just* that source code that does that... I get that kinda
>often, although not always...
>any idea what is goin on?
In the C language, every program must have a `main' function in at least one
of its source files. Probably the file you are compiling is not a complete
program of itself. Check to see if it *does* have a `main' function. If not,
it's just subroutines, and there is probably more of the program in another
source file.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -