delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/19/07:31:25

From: Richard Lanyon <rlanyon AT plato DOT wadham DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Undefined reference to `main'
Date: Sun, 19 Jul 1998 12:07:04 +0100
Organization: Oxford University
Lines: 27
Message-ID: <Pine.LNX.3.95.980719120559.15471B-100000@plato.wadham.ox.ac.uk>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980719135745 DOT 32I-100000 AT is>
NNTP-Posting-Host: plato.wadham.ox.ac.uk
Mime-Version: 1.0
In-Reply-To: <Pine.SUN.3.91.980719135745.32I-100000@is>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sun, 19 Jul 1998, Eli Zaretskii wrote:
> On Fri, 17 Jul 1998, Richard Lanyon wrote:

> > P:\>make dsweep
> > gcc -Wall -o dsweep.exe -Lc:\tdt\drivers\apos\c\ -Lc:\tdt\drivers\xbdrv\c\
> > dsweep.o rglio.o -lgpp -lm
> > c:/djgpp/lib/crt0.o(.data+0x92):crt0.s: undefined reference to `main'
> > c:/djgpp/lib/libc.a(crt1.o)(.text+0x312):crt1.c: undefined reference to
> > `main'
> > make.exe: *** [dsweep] Error 1
> > 
> > It's not just that I've misdefined "main", either - I'm using the vanilla
> > "int main(int argc, char *argv[])".

> In which object file (of the two you are linking) is `main' defined?

dsweep.o

> And why did you need those -L switches?

I'm trying to get my program to talk to some hardware connected to my
computer. The libraries were provided by the hardware manufacturer (TDT -
hence they're in c:\tdt\...).

Richard
Beware! Beware! His flashing eyes, his floating hair!

- Raw text -


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