From owner-freebsd-questions Fri Jan 5 6:52:19 2001 From owner-freebsd-questions@FreeBSD.ORG Fri Jan 5 06:52:17 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from be-well.ilk.org (lowellg.ne.mediaone.net [24.147.184.128]) by hub.freebsd.org (Postfix) with ESMTP id 6338B37B400 for ; Fri, 5 Jan 2001 06:52:17 -0800 (PST) Received: (from lowell@localhost) by be-well.ilk.org (8.11.1/8.11.1) id f05EqFF35726; Fri, 5 Jan 2001 09:52:15 -0500 (EST) (envelope-from lowell) Sender: lowell@be-well.ilk.org To: freebsd-questions@freebsd.org, ummacius@cc.UManitoba.CA Subject: Re: g++ and a.out References: From: Lowell Gilbert Date: 05 Jan 2001 09:52:15 -0500 In-Reply-To: ummacius@cc.UManitoba.CA's message of "4 Jan 2001 17:10:14 +0100" Message-ID: <44r92i3vc0.fsf@lowellg.ne.mediaone.net> Lines: 18 X-Mailer: Gnus v5.7/Emacs 20.7 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ummacius@cc.UManitoba.CA (Maciuszonek Artur) writes: > 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? I'm a little confused about whether the executable you built is called "a.out" or "hello.out". However, I'm pretty sure that this is Unix programming question #1: The "current directory" isn't on your path. For security reasons, we recommend that you leave it that way. Run a file in the current directory by prefixing it with "./". # ./a.out Hello, world! # To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message