From owner-freebsd-questions Mon Apr 12 18:47:42 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.cannet.com (cannet.com [206.156.188.2]) by hub.freebsd.org (Postfix) with SMTP id 4180B155B2 for ; Mon, 12 Apr 1999 18:47:39 -0700 (PDT) (envelope-from BenG%thekeyboard.com@all-ts1-dyn04.cannet.com) Received: from all-ts1-dyn04.cannet.com by mail.cannet.com id aa26948; 12 Apr 1999 21:46 EDT Message-ID: <3712A195.17B592EB@thekeyboard.com> Date: Mon, 12 Apr 1999 21:44:53 -0400 From: Benjamin George X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: knichel Cc: freebsd-questions@freebsd.org Subject: Re: g++ References: <19990412221912.C6D7F155E5@hub.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The "-o" option is to specify the output file... If you don't use it the default filename is "a.out" (on 2.2.8 of FreeBSD and previous versions... not sure about 3.x). So, you can compile using "g++ new.o", or "g++ -o myfile new.o" if you want to specify the compiled filename. Try "man g++" for more information. knichel wrote: > I am new to FreeBSD and have a question. I teach a C++ class in High School > and want to teach programming in a terminal, so I set up a BSD box. I use > PICO as my editor and I can compile my program using "g++ -c new.cc", but > when I try to link my program using "g++ -o new.o" I get the following > error... > > /usr/lib/crt1.o: In function `_start': > /usr/lib/crt1.o(.text+0x69): undefined reference to `main' > > What does this mean (pardon my ignorance)? > ___________________________________________________________________ > > Mike Knichel > Apple Authorized Service Provider > Tel: (518) 622-0490 Fax: (518) 622-0493 > Voice Mail: (518) 622-0490 x614 > e-mail: knichel@cdcsd.k12.ny.us > > ___________________________________________________________________ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- My Waterskiing Pages (Barefoot & Wakeboarding): http://waterski.pharamond.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message