Mail Archives: djgpp/1997/09/24/03:01:48
From: | daniel_t AT gate DOT net (Daniel T.)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | [q] Help with undefined reference in main?
|
Date: | Tue, 23 Sep 1997 23:48:32 -0400
|
Organization: | CyberGate, Inc.
|
Lines: | 24
|
Message-ID: | <daniel_t-2309972348330001@10.0.2.15>
|
NNTP-Posting-Host: | seminole.gate.net
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I just installed djgpp 2.01 in order to compile a c++ program that I
wrote, but I'm coming against a problem not in the FAQ...
First I had the "can't find crt0.o" problem and fixed that (thanks to the FAQ).
What about this one?
At the e:> prompt, I type:
gxx -o e:\mr-gap.exe e:\mr_prog\mr-gap.o
I get back:
e:/djgpp/lib\crt0.o(.data+0x92):crt0.s: undefined reference to `main'
e:/djgpp/lib/libc.a(crt1.o)(.text+0x312):crt1.c: undefined reference to `main'
What on earth? I've successfully compiled this program using a different
compiler...
I have main defined as "void main(void)"... maybe that's the problem? But
when I made my object file (using the -Wall switch) I didn't get any
errors at all...
--
Daniel T.
Dunedin, FL
- Raw text -