I am including a .h file with a global boost signal in a the header file of a class which is, in turn included in the main function's file. The linker says the signal is declare multiple times. The signal declaration is wrapped in the #ifndef
, #define
and #endif
block typical of C/C++ header files (used to avoid multiple declaration).
I am using Eclipse with gcc.
#ifndef SIG_HEADER
#define SIG_HEADER
#include <boost/signal.hpp>
boost::signal0 <void> signal1;
#endif
what am I doing wrong?