delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/25/02:57:35

Message-Id: <199907250657.CAA17226@delorie.com>
From: "Ted Mather" <TedMat AT CoastNet DOT com>
To: <djgpp AT delorie DOT com>
Subject: Re: Lib problems
Date: Sun, 24 Jan 1999 05:59:24 -0800
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

You have to declare function called main in every c program to tell the it
where to start.

int main(void) {

printf("Hello World");

}

> c:/djgpp/lib/crt0.o(.dara+0xc2):crt0.s: undefined reference to 'main'
> c:/djgpp/lib/libc.a(crt1.o(.text+0x446:crt1.c: undefined reference to
'main'

- Raw text -


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