Date: Sat, 20 Sep 1997 08:41:49 -0700 (PDT) Message-Id: <199709201541.IAA02367@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "news.champaign.pdnt.com" , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: [Q]: What is going on? Precedence: bulk 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