From owner-freebsd-questions Thu Jan 4 9:57:14 2001 From owner-freebsd-questions@FreeBSD.ORG Thu Jan 4 09:57:12 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from datasphereweb.com (c182500-a.frndl1.wa.home.com [24.10.46.121]) by hub.freebsd.org (Postfix) with SMTP id DE5F837B400 for ; Thu, 4 Jan 2001 09:57:11 -0800 (PST) Received: (qmail 8341 invoked by uid 1000); 4 Jan 2001 17:57:10 -0000 Date: Thu, 4 Jan 2001 09:57:10 -0800 From: David To: Maciuszonek Artur Cc: freebsd-questions@freebsd.org Subject: Re: g++ and a.out Message-ID: <20010104095710.A8135@datasphereweb.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from ummacius@cc.UManitoba.CA on Thu, Jan 04, 2001 at 10:10:02AM -0600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jan 04, 2001 at 10:10:02AM -0600, Maciuszonek Artur wrote: > Hi, I've written a basic hello world program. It compiles fine but when > I try to execute the file a.out I receive the message: > hello.out: Command not found > Am I missing a path declaration for the program directory? Any ideas? If you're trying to execute a.out it probably won't help trying to execute 'hello.out'. Not sure if this is a typo or not. If you're not able to execute a.out by simply typing it it's probably not in your $PATH. You can execute a.out by prepending it with ./ ie: ./a.out If a.out is not a workable name for a binary you can compile with a -o flag: g++ -o helloworld hello.cpp This creates a binary named helloworld. -- |> /\ \/ @ davidd@datasphereweb.com DataSphere - Back end web programming, site security, and networking david.daugherty@netmanage.com Software Engineer NetManage - The Bridge to E-Business http://www.wcug.wwu.edu/~doc ICQ: 21106703 "I like the dreams of the future better than the history of the past" -Thomas Jefferson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message