This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
bamboozled --a newbie dilemma
- To: help-gcc at gnu dot org
- Subject: bamboozled --a newbie dilemma
- From: "Dave Ayotte" <davepa at speakeasy dot org>
- Date: Thu, 19 Aug 1999 04:00:19 -0700
- Newsgroups: gnu.gcc.help
- Organization: Posted via Supernews, http://www.supernews.com
- Xref: wodc7nx0 gnu.gcc.help:583
hi everyone,
I apologize for the newbieness of this question.
My ISP is a Unix system, specifically a Sun OS. The c compiler is is GNU CC
version 2.7.2.
I wrote the following program:
#include <stdio.h>
void main()
{
printf("Goodbye, cruel world!\n");
}
I name it
goodbye.C
and put it in a .C directory
then used the following command to compile it:
g++ goodbye.C
I get no error messages and end up with a
goodbye.C
file and also an
a.out
file and those are the only files in my directory. I then type in
goodbye
to execute it, and nothing happens except the following message:
goodbye: Command not found
I've tried calling the file
goodbye.cpp
goodbye.c
I've tried it with just " main() " in the code instead of
void main()
I've also included
return 0;
after the
printf("Hello, world\n");
what am I doing wrong?
Thanx kindly for any and all help anyone may offer'
Dave