delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/13/00:00:28

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Compilation problems
Date: 13 Jun 1998 02:37:42 GMT
Organization: Oxford University, England
Lines: 23
Message-ID: <6lsolm$it0$1@news.ox.ac.uk>
References: <6ls22r$3c5$1 AT heliodor DOT xara DOT net>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Fri, 12 Jun 1998 21:05:44 +0100 in comp.os.msdos.djgpp Peter Wilkie
<bpw01 AT globalnet DOT co DOT uk> wrote:

: Hi, I am having problems compiling with gcc.  I am getting the following
: compilation error:

: >c:/progra~1/access~1/djgpp/lib/crt0.o(.data+0x92):crt0.s:undefined
: reference to 'main'
: >c:/progra~1/access~1/djgpp/lib/libc.a(crt1.o)(.text+0x312):crt1.c:undefined
: reference to 'main'

C programs start at the `main' function.  It looks as if your code did
not have one, so when the linker tried to make the executable it
couldn't find your entry point.

If you were just trying to compile a source file, not make an
executable, then you should give the `-c' switch, which makes gcc stop
after compiling, and output the object file.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

xu do tavla fo la lojban  --  http://xiron.pc.helsinki.fi/lojban/lojban.html

- Raw text -


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