From owner-freebsd-questions Sun Jan 16 15:19:13 2000 Delivered-To: freebsd-questions@freebsd.org Received: from extremis.demon.co.uk (extremis.demon.co.uk [194.222.242.30]) by hub.freebsd.org (Postfix) with ESMTP id ABE9A14C31 for ; Sun, 16 Jan 2000 15:19:08 -0800 (PST) (envelope-from gjvc@extremis.demon.co.uk) Received: (from gjvc@localhost) by extremis.demon.co.uk (8.9.3/8.9.3) id NAA04740; Sat, 15 Jan 2000 13:38:41 GMT (envelope-from gjvc) Date: Sat, 15 Jan 2000 13:38:41 +0000 From: George Cox To: "Ray D. Davis" Cc: freebsd-questions@freebsd.org Subject: Re: How to run compiled program Message-ID: <20000115133841.B4684@extremis.demon.co.uk> References: <4.2.0.58.20000114193450.00a3dcf0@mail.airmail.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.1.1i In-Reply-To: <4.2.0.58.20000114193450.00a3dcf0@mail.airmail.net>; from snoopy@mail.airmail.net on Fri, Jan 14, 2000 at 07:43:50PM -0600 X-Operating-System: FreeBSD 3.4-STABLE (i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 14/01 19:43, Ray D. Davis wrote: > I am on ver 2.8. I think what you mean to say is that you have version 2.8.x of gcc. > I have compiled an equivalent of hello world in both c and c++ using both > the default a.out method and the -o option. Like this? gcc -Wall -o hw hw.c Or perhaps like this: gcc -Wall -c hw.c gcc -o hw hw.o ? > Yet when I try to execute the file which is supposed to be linked, by > typing the file name, eg. ntest, the system says ntest: not a command. That's because your command shell is not looking the current directory for executable programs. Continuing our example above, you should type: ./hw to get the program to execute. best; gjvc -- [gjvc] 4.4BSD 4.ever! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message