Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 May 2000 10:51:23 -0400
From:      Nathan Vidican <webmaster@wmptl.com>
To:        Alex Kwan <alexkwan@pacific.net.hk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: A basic question about C programming
Message-ID:  <39200EEB.210934A0@wmptl.com>
References:  <000701bfbd9b$fd945300$591e40ca@alexkwan>

next in thread | previous in thread | raw e-mail | index | archive | help
Alex Kwan wrote:
> 
> Hi!
> 
> I am learning C programming with FreeBSD, I write a simple C program
> (filename: inform.c) as follow:
> #include <stdio.h>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39200EEB.210934A0>