delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/03/17:21:51

From: Kbwms AT aol DOT com
Message-ID: <5d0f69cd.3575be12@aol.com>
Date: Wed, 3 Jun 1998 17:20:17 EDT
To: djgpp AT delorie DOT com
Mime-Version: 1.0
Subject: Need Help Compiling Code with Templates

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.

K.B. Williams

- Raw text -


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