今天这样编译了一个程序,然后源程序就消失掉了...
例如:我的目录中有test.c 和一个编译好的test (使用 gcc -o test test.c)
然后我修改了一下 test.c 想重新编译一下,结果写成了:gcc -o test.c test
于是,报了一堆错误后我的test.c消失了。
我用
2>log
把错误都记下来啦,大家看看有什么可以告诉我的:
test(.rodata+0x0):/usr/src/build/90613-i386/BUILD/glibc-2.2.4/csu/init.c: multiple definition of `_fp_hw'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.rodata+0x0): first defined here
test: In function `_init':
test(.init+0x0): multiple definition of `_init'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o(.init+0x0): first defined here
test: In function `_start':
test(.text+0x0): multiple definition of `_start'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x0): first defined here
test(.fini+0x0):/usr/src/build/90613-i386/BUILD/glibc-2.2.4/csu/init.c: multiple definition of `_fini'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o(.fini+0x0): first defined here
test(.got+0x0):/usr/src/build/90613-i386/BUILD/glibc-2.2.4/csu/init.c: multiple definition of `_GLOBAL_OFFSET_TABLE_'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o(.got.plt+0x0): first defined here
test(.rodata+0x4):/usr/src/build/90613-i386/BUILD/glibc-2.2.4/csu/init.c: multiple definition of `_IO_stdin_used'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.rodata+0x4): first defined here
test(.data+0x0):/usr/src/build/90613-i386/BUILD/glibc-2.2.4/csu/init.c: multiple definition of `__data_start'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.data+0x0): first defined here
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crti.o(.dynamic+0x0): multiple definition of `_DYNAMIC'
test(.dynamic+0x0):/usr/src/build/90613-i386/BUILD/glibc-2.2.4/csu/init.c: first defined here
collect2: ld returned 1 exit status