This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
newbie gcc question
- To: help-gcc at gnu dot org
- Subject: newbie gcc question
- From: Maggie Owens <mmowens at my-deja dot com>
- Date: Wed, 13 Oct 1999 22:39:35 GMT
- Newsgroups: gnu.gcc.help
- Organization: Deja.com - Before you buy.
- Xref: wodc7nx0 gnu.gcc.help:1397
I have a little experience writing C++ in the dos and windows
environment. Now I am trying to write a c program and compile it in gcc
on a unix system. As a test, I wrote the traditional hello, world
program:
#include <stdio.h>
void main()
{
printf("Hello, world!");
}
I compiled it using:
gcc helloworld.c
Now, I have a.out, which appears to be executable.
I am using the z shell.
I tried typing:
a.out
and got:
zsh: command not found: a.out
so I tried
sh a.out
and got
a.out: (M-^A)^C^A^K: not found
a.out: syntax error at line 10: `;;' unexpected
finally, I tried
./a.out
and got nothing in response
I feel abysmally stupid. How can I execute my program?
Thanks in advance
--
Autoreplies will (hopefully) bounce. To reply to me, please send mail
to mmowens at panix dot com.
Sent via Deja.com http://www.deja.com/
Before you buy.