Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: Kbwms AT aol DOT com, djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Need Help Compiling Code with Templates Date: Wed, 3 Jun 1998 16:57:48 -0700 Message-ID: <19980603235734.AAF6210@ppp104.cartsys.com> Precedence: bulk At 05:20 6/3/1998 EDT, Kbwms AT aol DOT com wrote: >I am trying to compile and link some C++ code that uses templates. >At link time I get the following diagnostics: > >c:/djgpp.v2/lib/crt0.o(.data+0x92):crt0.s: undefined reference to `main' >c:/djgpp.v2/lib/libc.a(crt1.o)(.text+0x346):crt1.c: undefined reference to >`main' > >To get this far I used the following command line: > >gcc -o chk.exe -Wall -fguiding-decls -fname-mangling-version-1 *.cpp ^^^^^^^^^^^^^^^^^^^^^^^^^ > >I know that main is being compiled because I see some warning diagnostics >regarding comparison between signed and unsigned. > >Please tell me what I am doing wrong and how to fix it. Why do you need to use the special name mangling switch? I suspect that is causing `main' to be mangled, and so the startup code can't link with it. Nate Eldredge nate AT cartsys DOT com