PDA

View Full Version : Help in gedit for C programming



mrkorig
July 4th, 2010, 01:44 AM
hi, i have created a simple C code in gedit, but i have problems in compiling.

cc -c sample.c works fine in the terminal

but when i input cc -o sample sample.c it gives me this msgs.

mark@mark-laptop:~$ cc -o sample sample.c
/usr/bin/ld: cannot open output file sample: Is a directory
collect2: ld returned 1 exit status


thank u in advance for the help

Milliways
July 4th, 2010, 02:17 AM
hi, i have created a simple C code in gedit, but i have problems in compiling.

cc -c sample.c works fine in the terminal

but when i input cc -o sample sample.c it gives me this msgs.

mark@mark-laptop:~$ cc -o sample sample.c
/usr/bin/ld: cannot open output file sample: Is a directory
collect2: ld returned 1 exit status


thank u in advance for the help

Do you have a directory "sample" ?
This seems to be what the error message is telling you.

StephenF
July 4th, 2010, 05:13 AM
Agree with the first reply. Call your program something else or rename that directory.

mrkorig
July 4th, 2010, 06:41 AM
i got it ur right i got a folder named sample..

thanks so much for the help...