Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GCC 3.40 on Solaris 8 1

Status
Not open for further replies.

felihad

IS-IT--Management
Apr 21, 2004
17
0
0
US
Hello,

I am new to this OS; i was able to download the packages: libiconv and gcc 3.4 to install the C Compiler on my system as the website ( describes.

Everything looks ok, also when i look for the gcc path it shows this:

# find / -name gcc
/usr/local/bin/gcc
/usr/local/doc/gcc
/usr/local/libexec/gcc
/usr/local/lib/gcc

My question is how can i test that the compiler its working ?

Thanks in advanced.
 
Felihad,
You can run command "which gcc" to see if you would select the correct compiler. If you get no return, make sure /usr/local/bin is in your environment path.

Then write the "Hello World" program that we all write when we take a new programming class.

vi hello.c

#include <stdio.h>

void main()
{
printf("HELLO WORLD\n");
}

gcc -o Hello Hello.c

If it compiles, You are good to go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top