On Oct 12, 2007, at 2:49 PM, a,bug,free,life wrote:
Whenever i creat a .c file and execute it it changes the source
file to
binary file.
I tried with the program hello world.
It compiles it properly, but after the linker it overwrites the
source file
the command line prompt i used were
gcc -c ccc.c
gcc -0 ccc.c ccc.o
./ccc.o
I'm not sure, but if you mean -o (lower-case O) instead of -0 (zero),
then you've told GCC to output the resulting executable and name it
"ccc.c", replacing your original source file.
I don't know off the top of my head what -0 does, if anything.
--
Rick