Date: Sun, 19 Jul 1998 13:58:11 +0300 (IDT) From: Eli Zaretskii To: Richard Lanyon cc: djgpp AT delorie DOT com Subject: Re: Undefined reference to `main' In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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? And why did you need those -L switches?