"matrut" <[EMAIL PROTECTED]> writes: > class CSignal > { > public: > CSignal(void) > { > m_this = this; > }; > > ~CSignal(void); > > protected: > static CSignal *m_this; > }:
Syntax error. Please next time post real code. > and after linking the output is af follows: > > : undefined reference to `CService::m_this' > > The code works on Visual Studio C++ and what's the matter about g++? The matter is that g++ is correct and Visual Studio C++ isn't. The line static CSignal *m_this; declares m_this, but doesn't define it. You have to add a definition of that variable to your program. > What's the sollution? Fix your code. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus