From owner-freebsd-questions Mon May 15 7:51:25 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.wmptl.com (mail2.wmptl.com [216.221.73.131]) by hub.freebsd.org (Postfix) with ESMTP id 8908637B7D0 for ; Mon, 15 May 2000 07:51:19 -0700 (PDT) (envelope-from webmaster@wmptl.com) Received: from wmptl.com ([10.0.0.168]) by mail2.wmptl.com (8.9.3/8.9.3) with ESMTP id LAA35691; Mon, 15 May 2000 11:08:45 -0400 (EDT) (envelope-from webmaster@wmptl.com) Message-ID: <39200EEB.210934A0@wmptl.com> Date: Mon, 15 May 2000 10:51:23 -0400 From: Nathan Vidican Reply-To: webmaster@wmptl.com X-Mailer: Mozilla 4.72 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: Alex Kwan Cc: freebsd-questions@freebsd.org Subject: Re: A basic question about C programming References: <000701bfbd9b$fd945300$591e40ca@alexkwan> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alex Kwan wrote: > > Hi! > > I am learning C programming with FreeBSD, I write a simple C program > (filename: inform.c) as follow: > #include > main() > { > printf("A .c is used to end a C program filename.\n"); > } > > I compile it with "cc -o inform inform.c", when the compilation is > finished, > I have got the file "inform", but it can't execute and got the error > "inform: Command not found", What is the problem of me? > > Thanks > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message Two things, #1 -check the path, you must supply some sort of path to the executable, #2 -check file permissions, make sure it's set to be executable, (seeing as how this is a test executable, I suggest you chmod 755 it). so try this, (assuming you're in the directory that the inform file is): chmod 755 inform ./inform -- Nathan Vidican webmaster@wmptl.com Windsor Match Plate & Tool Ltd. http://www.wmptl.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message