当前位置: 技术问答>linux和unix
Link problem
来源: 互联网 发布时间:2015-05-18
本文导语: Hi, I meet a problem about link, the error message is as the following: ... ld:warning:symbol 'xxxx' has differing size: (file /xxxxxx/libBuild.a(aaa.o)value = 0x4; file /xxxxxx/libBuild.a(bbb.o)value = 0x10); /xxxxxx/libBuild.a(bbb.o) de...
Hi, I meet a problem about link, the error message is as the following:
...
ld:warning:symbol 'xxxx' has differing size:
(file /xxxxxx/libBuild.a(aaa.o)value = 0x4; file /xxxxxx/libBuild.a(bbb.o)value = 0x10);
/xxxxxx/libBuild.a(bbb.o) definition taken
...
What does it mean? Especially the "definition taken"!
Thanks!
...
ld:warning:symbol 'xxxx' has differing size:
(file /xxxxxx/libBuild.a(aaa.o)value = 0x4; file /xxxxxx/libBuild.a(bbb.o)value = 0x10);
/xxxxxx/libBuild.a(bbb.o) definition taken
...
What does it mean? Especially the "definition taken"!
Thanks!
|
这个意思是说在aaa.o和bbb.o里有符号重定义,‘xxxx'。应该是这两个模块文件里的xxxx类型不同,且是全局变量。连接器最后选用了bbb.o里的定义,即认为value = 0x10。