delorie.com/archives/browse.cgi | search |
From: | Charles Terry <cterry AT plinet DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Strange compile-time error |
Date: | Fri, 27 Mar 1998 08:33:18 -0800 |
Organization: | All USENET -- http://www.Supernews.com |
Lines: | 18 |
Message-ID: | <351BD4CE.248C@plinet.com> |
References: | <351AC75F DOT E4329B26 AT u DOT washington DOT edu> |
NNTP-Posting-Host: | 29889 AT 207 DOT 174 DOT 3 DOT 216 |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Radha Kotamarti wrote: > > Hi, > > I'm experiencing a strange error when I try to compile a file that > includes one other file located in the local directory (I'm including > the sources with this posting). Here's how I invoke the compiler and the > output I'm getting: > > [C:/complex_test/complex/complexlib] gcc complex.C -o complexlib.a > 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' > I think you need to change the file type complex.c to complex.cc so that the main function will have its name mangled. Charles Terry
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |