多重定义的链接错误
我收到两种类型的链接错误。
一个是关于“多重定义的符号”,
另一个是关于“符号统计数据具有不同的大小”之类的问题,
我无法理解如何解决它们。 请你帮助我好吗 ?
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
objs\kernel\syslog.o
objs\kernel\cfdp_server.o
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
objs\kernel\syslog.o
objs\kernel\syslog_server.o
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
objs\kernel\syslog.o
objs\kernel\syslog_server.o
[elxr] (warning) symbol stats has different sizes in:
objs\kernel\syslog.o
..\GHS\int507\bilge8260\libitcpip.a(v3main.o)
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
objs\kernel\syslog.o
lib\pus\libpus.a(os_abstract.o)
[elxr] (warning) symbol stats has different sizes in:
..\GHS\int507\myBSP\libitcpip.a(v3main.o)
lib\pus\libpus.a(os_abstract.o)
[elxr] (warning) symbol stats has different sizes in:
..\GHS\int507\myBSP\libitcpip.a(v3main.o)
lib\pus\libpus.a(pus.o)
[elxr] (error) errors during processing
Error: build failed
Build failed (Fri Oct 14 17:27:31 2011)
I get 2 types of linking erros.
One is about "multiply defined symbols"
The other is about something like "symbol stats has different sizes in"
I cannot understand how to solve them.
Could you please help me ?
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
objs\kernel\syslog.o
objs\kernel\cfdp_server.o
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
objs\kernel\syslog.o
objs\kernel\syslog_server.o
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
objs\kernel\syslog.o
objs\kernel\syslog_server.o
[elxr] (warning) symbol stats has different sizes in:
objs\kernel\syslog.o
..\GHS\int507\bilge8260\libitcpip.a(v3main.o)
[elxr] (error) symbol isalnum multiply defined in:
[elxr] (error) symbol isalpha multiply defined in:
[elxr] (error) symbol isblank multiply defined in:
[elxr] (error) symbol iscntrl multiply defined in:
[elxr] (error) symbol isdigit multiply defined in:
[elxr] (error) symbol isgraph multiply defined in:
[elxr] (error) symbol islower multiply defined in:
[elxr] (error) symbol isprint multiply defined in:
[elxr] (error) symbol ispunct multiply defined in:
[elxr] (error) symbol isspace multiply defined in:
[elxr] (error) symbol isupper multiply defined in:
[elxr] (error) symbol isxdigit multiply defined in:
[elxr] (error) symbol tolower multiply defined in:
[elxr] (error) symbol toupper multiply defined in:
[elxr] (error) symbol isascii multiply defined in:
[elxr] (error) symbol toascii multiply defined in:
objs\kernel\syslog.o
lib\pus\libpus.a(os_abstract.o)
[elxr] (warning) symbol stats has different sizes in:
..\GHS\int507\myBSP\libitcpip.a(v3main.o)
lib\pus\libpus.a(os_abstract.o)
[elxr] (warning) symbol stats has different sizes in:
..\GHS\int507\myBSP\libitcpip.a(v3main.o)
lib\pus\libpus.a(pus.o)
[elxr] (error) errors during processing
Error: build failed
Build failed (Fri Oct 14 17:27:31 2011)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜您使用两个不同的头文件,其中定义了以下符号。
符号统计数据的冲突具有不同的大小,也一定是由于同一问题造成的。
例如。如果模块 1 是基于 cplusplus 的并且包含 iostream.h,模块 2 是基于 C 的并且包含 stdio.h,并且如果我将模块 1 和模块 2 组合起来创建单个模块,则 __STDOUT、__STDIN、__STDERR 等问题会成倍增加定义的将会出现。我认为报告的问题是类似的。
I am guessing your using two different header files where the following symbols are defined.
The clash regarding symbol stats has different sizes in, must also be due to the same issue.
Eg. If module 1 is cplusplus based and has iostream.h included and module 2 is C based and has stdio.h included, and if i combine module 1 and module 2 to create a single module, issues such as __STDOUT, __STDIN, __STDERR is multiply defined will show up. I presume the issue reported is similar.