胡杨-345459 发表于 2012-3-8 11:00:37

大家有没有遇到这种编译错误?大家都怎么解决?

 linking...
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Gateway_IP multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol IP_Addr multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Phy_Addr multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Rx_Buffer multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Sub_Mask multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Tx_Buffer multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Temp_Buffer multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol UART_Rx_Buffer multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol UART_Tx_Buffer multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol RxCounter multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S0_Data multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S0_State multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S1_Data multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S1_State multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S2_Data multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S2_State multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S3_Data multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol S3_State multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Sn_DPort multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Sn_Mode multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Sn_Port multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol TxCounter multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol TxIndex multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol UART_DataReceive multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol W5100_Interrupt multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol Sn_DIP multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol close multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol connect multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol disconnect multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol getSockStatus multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol listen multiply defined (by device.o and demo.o).
.\Obj\STM3210E-EVAL.axf: Error: L6200E: Symbol open multiply defined (by device.o and demo.o).
Target not created

胡杨-345459 发表于 2012-3-8 11:02:04

RE:大家有没有遇到这种编译错误?大家都怎么解决?

我都快折腾两天了,这不争气的程序还是很不给面子

magiclakesz 发表于 2012-3-8 11:05:47

RE:大家有没有遇到这种编译错误?大家都怎么解决?

应该是两个文件对同一个 Symbol 进行了重复定义吧

胡杨-345459 发表于 2012-3-8 13:24:10

RE:大家有没有遇到这种编译错误?大家都怎么解决?

这个我也不太清楚,网上有说是因为那些变量定义时没有加extern,后来我挨边找了找,把没加的都加上现在就有一条这种提示了:.\Obj\STM3210E-EVAL.axf: Error: L6218E: Undefined symbol Sn_DIP (referred from demo.o).   可是Sn_DIP在定义时已经加extern了啊。这一个错误怎么都搞不定了……而且错误还不能自动定位的那一行。
哪位高人能指点一二啊

xinjitmzy-34588 发表于 2012-3-8 14:48:32

回复:大家有没有遇到这种编译错误?大家都怎么解决?

我遇到过了那些文件全是.o的文件
搞了好久也没搞出来
不过后来找了一个比较好的模板,把主程序移植一下。进而再次编译的时候就通过了,如果需要模板的话加qq939842278,我也刚学习这个!

xiaodc88 发表于 2012-3-8 16:24:32

回复:大家有没有遇到这种编译错误?大家都怎么解决?

很简单,你在不同的文件多次定义了同样的变量,解决办法是加extern没错,但你得注意,总得留一个定义不要加extern,不然就会报这个变量没有定义啊,提示说的很清楚了:D:D。你全部都加了extern当然又会报错

xiaodc88 发表于 2012-3-8 16:24:32

回复:大家有没有遇到这种编译错误?大家都怎么解决?

很简单,你在不同的文件多次定义了同样的变量,解决办法是加extern没错,但你得注意,总得留一个定义不要加extern,不然就会报这个变量没有定义啊,提示说的很清楚了:D:D。你全部都加了extern当然又会报错

发表于 2012-3-8 16:33:26

RE:大家有没有遇到这种编译错误?大家都怎么解决?

重复定义,工程中找一下这几个定义。

swallow1029 发表于 2012-3-8 17:41:40

RE:大家有没有遇到这种编译错误?大家都怎么解决?

是的,我也遇到过这样的错误。就定义重复了或者 没有加extern ,
注意 定义类型的 头文件 要放在最前面,不然的话 也会错误的。

火雷达 发表于 2012-3-8 21:57:52

回复:大家有没有遇到这种编译错误?大家都怎么解决?

太长了吧,应该是没有找到库
页: [1] 2
查看完整版本: 大家有没有遇到这种编译错误?大家都怎么解决?