Date: Mon, 12 Apr 1999 21:44:53 -0400 From: Benjamin George <BenG@thekeyboard.com> To: knichel <knichel@cdcsd.k12.ny.us> Cc: freebsd-questions@freebsd.org Subject: Re: g++ Message-ID: <3712A195.17B592EB@thekeyboard.com> References: <19990412221912.C6D7F155E5@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3712A195.17B592EB>