Help on gcc command

Hi All,

I have added a gcc 3.4.6 package into Solaris 10 recently and I didnot receive any error on that.

I have set the path of this gcc to /usr/local/bin

I tried executing a simple Hello World 'C' program but I get the following error "bash: /usr/local/bin/gcc: invalid argument".

I cross-checked if there is any error in adding packages but there was none. It displayed message "successfully installed"

Can someone help me in executing the 'C' programs using gcc.

Thanks in advance.

Have you compiled your program? How?

Regards

Hi,
Compiling the program........I tried giving

bash#]gcc first.c -o first
where first.c is C program.

I also tried
bash#]gcc first.c.

In either of the cases same error.......

I just gave
gcc and hit Enterkey...... same error

"bash: /usr/local/bin/gcc: invalid argument".

gcc -o first first.c

Thanks,

But that didnot work.

I get the same error.....

"bash: /usr/local/bin/gcc: Invalid argument"

i guess the above said command gcc -o first first.c must generate an elf file which can then be executed. But irrespective of the argument, the command is giving above error.

Hi, I have the same problem. Did you find a solution for this Problem?
Thx Sebastian

/usr/sfw/bin/gcc should just work with Solaris 10. No need to install another instance, especially if the latter doesn't work for some reason.

Hi....

I installed gcc package in /usr/local/bin and added the same to the existing PATH. It worked.

 
 
#PATH=$PATH:/usr/local/bin