delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/20/11:45:06

Date: Sat, 20 Sep 1997 08:41:49 -0700 (PDT)
Message-Id: <199709201541.IAA02367@adit.ap.net>
Mime-Version: 1.0
To: "news.champaign.pdnt.com" <consalus AT pigdick DOT org-asm>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: [Q]: What is going on?

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019