Date: Tue, 17 Nov 1998 21:37:03 -0500 (EST) From: Andriss <andriss@argate.com> To: G578@ix.netcom.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: C executables Message-ID: <Pine.BSF.3.96.981117213334.25677A-100000@argate.com> In-Reply-To: <365231AD.3657@ix.netcom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>I know this sounds idiotic, but I can't get my "C" executables to run. >I've compiled with "cc" and with "gcc" (which I installed from the >packages), and I get no errors, and I create "a.out", but when I type >"a.out" to run the thing, I get "...not found." I'm new to C and new to >UNIX, so I'm probably doing something excrutiatingly dumb. It's just >that, this is how it worked in Caldera Linux, and this is how all the C >books say it should work in pretty much any UNIX environment. You >compile, you don't specify an object module name, it defaults to >"a.out", then you type "a.out" and, Voila, Hello World! Why am I >getting Voila, Not Found? > You know, it might just be a syntax error when you execute your programs. Suppose the program is called a.out, and is located in /home/user. First, you should type cd /home/user to get to that dir, then: ./a.out to execute the file. From what I see, you are missing that ./ part, and the shell looks for a.out in your $PATH, but not in current dir. Hope this helps, Andriss ________________________________________ Andriss@ArGate.com http://ArGate.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?Pine.BSF.3.96.981117213334.25677A-100000>
