www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/04/20:31:18

Date: Mon, 5 Jun 2000 06:13:55 +0600 (LKT)
From: Kalum Somaratna aka Grendel <kalum AT lintux DOT cx>
X-Sender: kalum AT roadrunner DOT grendel DOT net
To: RyanR <webmaster AT winnim DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Newbie question
In-Reply-To: <TTl_4.1528$EU3.7311@newsfeed.slurp.net>
Message-ID: <Pine.LNX.4.21.0006050612320.1674-100000@roadrunner.grendel.net>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 4 Jun 2000, RyanR wrote:

> Im just recently got djgpp, and I compiled a program just fine, but when i
> tried to make it I got some errors in the Rhide message window:
> 
> Error: c:/djgpp/lib/crt0.o(.data+0xc2):crt0.s: undefined reference to 'main'
> Error: c:/djgpp/lib/libc.a(crt1.o)(.text+0x44e):crt1.c: undefined referense
> to 'main'
> Error: collect2: ld returned 1 exit status
> There were some errors
> 


Could you please make sure that the source you are trying to compile has a
main function...

int main()
{

}


something like that...if there is no main function then you can get the
link time errors...

> Now of the files mentioned i can only find crt0.o and libc.a in the lib dir,
> am i missing somthing? The code is fine i believe, its copyed out of a book
> and should work. Also I have been able to make other programs, simpler ones
> (eg hello world) but not this one.

I think the reason is that there is no main function in the source...

Grendel

Hi, I'm a signature virus. plz set me as your signature and help me spread
:)


- Raw text -


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