C code execution on AIX

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

C code execution on AIX

Post 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
Regards,
Shree
785-816-0728
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Check the four environment variables in the Compiler group.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post by Sreedhar »

Thanks for all your input it worked.
Regards,
Shree
785-816-0728
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

WHAT worked?

Once you've posted the answer to that question, please mark the thread as resolved.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply