multiple declaration of "foo"
| From: | Miroslav Kubelík | Date: | Thu, 01 Sep 2011 10:39:48 +0000 |
| Subject: | multiple declaration of "foo" | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-8502@lists.php.net to get a copy of this message | ||
Hello, I have some newbie "C" question:
I have two *.c files as part of my extension. In both I have these declarations:
a.c
ZEND_BEGIN_ARG_INFO_EX(arginfo_construct, ...
b.c
ZEND_BEGIN_ARG_INFO(arginfo_construct, ...
I think it's correct because both are expanded to:
static const zend_arg_info arginfo_construct[] ...
and it's correct to have two symbols with same names in two "modules" - *.c files, isn't it?
but some users complain for linker warnings:
.libs/b.o:(.data.rel.local+0x80): multiple definition of
`arginfo_construct'
.libs/a.o:(.data.rel.local+0x80): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/../../../../x86_64-pc-linux-gnu/b
in/ld: Warning: size of symbol `arginfo_construct' changed from 160 in
.libs/a.o to 80 in .libs/b.o
But in my OS no linker warning presented. Do you know how can I see these warnings in my OS?
Regard
M. Kubelik