How to compile a c program with sunstudio11

I just start learning to program in C, i got Sunstudio11 to compile the programs, but when i want to compile a program i get this message:

cc program.c

/usr/ucb/cc: language optional software package not installed

and i go to the Sunstudio tutorial but is very confusing, can somebody please tell me how to compile a program so i can keep learning C language instead of trying to figure out how to use Sunstudio? I wish it was as easy as compiling a program in FreeBSD or Linux.

I am new to Solaris OE also.

Thank you.

[557 byte] By [unix_solarisa] at [2007-11-26 19:42:55]
# 1
I think the reason is that your PATH environment variable is set incorrectly.It should include SunStudio compilers.On Solaris they are usually installed to /opt/SUNWspro/bin
Vladimir_Kvashina at 2007-7-9 22:25:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Can you tell me how to set the PATH, because i did it how the installation says but is not worcking, or maybe i did it wrong because i could not understand it very clearly, and i am very new to Solaris. Thanks Vladimir.
unix_solarisa at 2007-7-9 22:25:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

If your SunStudio compilers are located at their default location (/opt/SUNWspro/bin - just check that you have such directory) - then use

PATH=/opt/SUNWspro/bin:${PATH}

export PATH

(Btw: are you new to Unix at all or just to Solaris? In the latter case I probably misunderstood the question :-))

Vladimir_Kvashina at 2007-7-9 22:25:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4
Thank you Vladimir that did work, now i can concentrate in learning C language, and i am new to Solaris, i used FreeBSD before. Solaris is way better.Now, the program can only be compile with the Terminal, or can i compile it with Sunstudio as well.
unix_solarisa at 2007-7-9 22:25:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
Sure. And it is much more convenient.Just do not forget to use correct PATH
Vladimir_Kvashina at 2007-7-9 22:25:29 > top of Java-index,Development Tools,Solaris and Linux Development Tools...