[Qt-interest] "#ifdef unix" usage problem in header file for moc file

Paul Floyd paulf at free.fr
Wed Dec 9 17:33:03 CET 2009


Quoting Paul Floyd <paulf at free.fr>:

> Quoting navid navid <n_nnavid at yahoo.com>:
>
> > Hello,
> >
> > when I include a signal definition in header file of sampleclass.cpp:
> > #ifdef unix
> >   void sampleSignal(int ireport);
> > #endif

> Your problem is that you're trying to declare a class member function with a
> standalone function declaration. This won't work. You need to include the
> file
> with the definition of class SampleClass.

On second thoughts, not if your snippet was extracted from with in the class
definition scope rather than global scope, as I assumed.

A+
Paul
-- 
Paul Floyd   http://paulf.free.fr



More information about the Qt-interest-old mailing list