Page 1 of 1

C code execution on AIX

Posted: Wed Jun 06, 2007 6:27 am
by Sreedhar
I have written a sample program
#include<stdio.h>
main()
{
print ("Hello World");
}


I know that I have set up the C++ compiler bez when I type CC on the command prompt I get the help related to it.

I am compiling as

cc -o <Program name>

It is not giving any warning during the compilation.

But while running it says syntax error.



Thanks in advance

Posted: Wed Jun 06, 2007 7:21 am
by DSguru2B
how are you running it? There must be a file a.out created when you compile your code. Execute a.out
Is that what you are doing?

Posted: Wed Jun 06, 2007 9:06 pm
by ray.wurlod
Check the four environment variables in the Compiler group.

Posted: Thu Jun 07, 2007 12:07 am
by Sreedhar
Thanks for all your input it worked.

Posted: Thu Jun 07, 2007 12:56 am
by ray.wurlod
WHAT worked?

Once you've posted the answer to that question, please mark the thread as resolved.