当前位置: 技术问答>linux和unix
新手请教一个cc编译问题,不用-g可以,用了-g就报错?
来源: 互联网 发布时间:2015-10-28
本文导语: cc -o -g test test.c tool.c -lcurses -lisam i386ld: Symbol _fini in test is multiply defined. First defined in /usr/ccs/lib/ crt1.o i386ld: Symbol _start in test is multiply defined. First defined in /usr/ccs/lib /crt1.o i386ld: Symbol _mcount in te...
cc -o -g test test.c tool.c -lcurses -lisam
i386ld: Symbol _fini in test is multiply defined. First defined in /usr/ccs/lib/
crt1.o
i386ld: Symbol _start in test is multiply defined. First defined in /usr/ccs/lib
/crt1.o
i386ld: Symbol _mcount in test is multiply defined. First defined in /usr/ccs/li
b/crt1.o
i386ld: Symbol _init in test is multiply defined. First defined in /usr/ccs/lib/
crt1.o
i386ld: Symbol _lib_version in test is multiply defined. First defined in /usr/c
cs/lib/values-Xa.o
i386ld: Symbol _on_everest in test is multiply defined. First defined in /usr/cc
s/lib/values-Xa.o
i386ld: Symbol _runtime in test is multiply defined. First defined in /usr/ccs/l
ib/values-Xa.o
i386ld: Symbol main in test.o is multiply defined. First defined in test
i386ld: Symbol check_xyk in tool.o is multiply defined. First defined in test
i386ld: Symbol check_jjk in tool.o is multiply defined. First defined in test
i386ld: Symbol check_new in tool.o is multiply defined. First defined in test
i386ld: Symbol get_iport in tool.o is multiply defined. First defined in test
i386ld: Symbol get_mmdd in tool.o is multiply defined. First defined in test
i386ld: Symbol writefile in tool.o is multiply defined. First defined in test
i386ld: Symbol qlpmp in tool.o is multiply defined. First defined in test
i386ld: Symbol errmsg in tool.o is multiply defined. First defined in test
i386ld: Symbol check_zh in tool.o is multiply defined. First defined in test
i386ld: Symbol xtoday in tool.o is multiply defined. First defined in test
i386ld: Symbol timenow in tool.o is multiply defined. First defined in test
i386ld: Symbol getdxje in tool.o is multiply defined. First defined in test
我该怎么办呢?test.c里面根本没有上面的东西啊?是不是找到那些文件,然后删除掉相关定义呢?
i386ld: Symbol _fini in test is multiply defined. First defined in /usr/ccs/lib/
crt1.o
i386ld: Symbol _start in test is multiply defined. First defined in /usr/ccs/lib
/crt1.o
i386ld: Symbol _mcount in test is multiply defined. First defined in /usr/ccs/li
b/crt1.o
i386ld: Symbol _init in test is multiply defined. First defined in /usr/ccs/lib/
crt1.o
i386ld: Symbol _lib_version in test is multiply defined. First defined in /usr/c
cs/lib/values-Xa.o
i386ld: Symbol _on_everest in test is multiply defined. First defined in /usr/cc
s/lib/values-Xa.o
i386ld: Symbol _runtime in test is multiply defined. First defined in /usr/ccs/l
ib/values-Xa.o
i386ld: Symbol main in test.o is multiply defined. First defined in test
i386ld: Symbol check_xyk in tool.o is multiply defined. First defined in test
i386ld: Symbol check_jjk in tool.o is multiply defined. First defined in test
i386ld: Symbol check_new in tool.o is multiply defined. First defined in test
i386ld: Symbol get_iport in tool.o is multiply defined. First defined in test
i386ld: Symbol get_mmdd in tool.o is multiply defined. First defined in test
i386ld: Symbol writefile in tool.o is multiply defined. First defined in test
i386ld: Symbol qlpmp in tool.o is multiply defined. First defined in test
i386ld: Symbol errmsg in tool.o is multiply defined. First defined in test
i386ld: Symbol check_zh in tool.o is multiply defined. First defined in test
i386ld: Symbol xtoday in tool.o is multiply defined. First defined in test
i386ld: Symbol timenow in tool.o is multiply defined. First defined in test
i386ld: Symbol getdxje in tool.o is multiply defined. First defined in test
我该怎么办呢?test.c里面根本没有上面的东西啊?是不是找到那些文件,然后删除掉相关定义呢?
|
-g 放在 -o 前面
|
代码贴出来看看
|
up