On Tue, Sep 15, 1998 at 04:29:39PM -0500, Matt Garman wrote: > > > While working on some C++ code for a programming assignment, I got the > following error: > > /usr/lib/crt1.o(.text+0x36): undefined reference to `main' > collect2: ld returned 1 exit status > > And that is simply after typing "g++ <file>.cc"
You don't have a main() function. > The other error is as follows: > > If I mistakenly type "gcc <file>.cc" : > > gcc: installation problem, cannot exec `cc1plus': No such file or directory > > I know the correct thing to do is to call g++ explicitly when > compiling C++ code, but I'd like to fix the error. What error? gcc is for C, g++ is for C++. You can use g++ with most C programs, but not the other way round. The reason is because we use a complex setup, where gcc is actually gcc 2.7.2.3 and g++ is egcs2.9x.yy. This is all for your benefit. The drawback is that you can't compile C++ programs with gcc, but who wants to do so anyway? Marcus -- "Rhubarb is no Egyptian god." Debian GNU/Linux finger brinkmd@ Marcus Brinkmann http://www.debian.org master.debian.org [EMAIL PROTECTED] for public PGP Key http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/ PGP Key ID 36E7CD09