L
lars.uffmann
Easily described problem:
Using g++ version 3.3.5 under suse 9.3,
bla.h:
-----------
#ifndef myTEST
#define myTEST
ZFSInt test;
#endif
------------
leads to an error at link time...
application.o(.bss+0x0):/path_here/application.cpp:19: multiple
definition of `test'
app.o(.bss+0x0):/path_here/app.cpp:17: first defined here
....for EVERY call of #include "bla.h"
Apparently the #ifndef only works at compile time, but somehow causes
an error at linktime. Any solution? I want the variable "test"
available in all modules that #include "bla.h"
Regards,
Lars Uffmann
Using g++ version 3.3.5 under suse 9.3,
bla.h:
-----------
#ifndef myTEST
#define myTEST
ZFSInt test;
#endif
------------
leads to an error at link time...
application.o(.bss+0x0):/path_here/application.cpp:19: multiple
definition of `test'
app.o(.bss+0x0):/path_here/app.cpp:17: first defined here
....for EVERY call of #include "bla.h"
Apparently the #ifndef only works at compile time, but somehow causes
an error at linktime. Any solution? I want the variable "test"
available in all modules that #include "bla.h"
Regards,
Lars Uffmann