none
Alexandre Oliva
oliva@dcc.unicamp.br
Thu Nov 19 06:05:00 GMT 1998
On Nov 19, 1998, Patrick Barron <barron@adulis.fr> wrote:
> file2-a.o(.bss+0x4): multiple definition of `i1'
> file1-a.o(.bss+0x4): first defined here
> I read that the problem comes frome the static variable.
Nope, the problem is the duplicate definition of a global variable.
If they're not supposed to be the same variable, name them differently,
make them both static or declare them within an anonymous namespace.
If they are, just declare the variable as extern in one of the
translation units, and define it in the other.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org.au}
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list