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

navid navid n_nnavid at yahoo.com
Wed Dec 9 16:46:00 CET 2009


thanks

it seems that unix & win32 are for .pro files.


--- On Wed, 12/9/09, BOUCARD Olivier <boucard_olivier at yahoo.fr> wrote:

> From: BOUCARD Olivier <boucard_olivier at yahoo.fr>
> Subject: Re : [Qt-interest] "#ifdef unix" usage problem in header file for moc file
> To: "navid navid" <n_nnavid at yahoo.com>, qt-interest at trolltech.com
> Date: Wednesday, December 9, 2009, 7:36 AM
> Hi,
> 
> Try use Q_OS_UNIX
> instead.
> 
> De :
> navid navid <n_nnavid at yahoo.com>
> À :
> qt-interest at trolltech.com
> Envoyé le :
> Mer 9 Décembre 2009, 16 h 19 min 03 s
> Objet :
> [Qt-interest] "#ifdef unix" usage problem in
> header file for moc file
> 
> Hello,
> 
> when I include a signal definition in header file of
> sampleclass.cpp:
>  
> #ifdef unix  
>   void sampleSignal(int ireport);
> #endif
> 
> I cant see it in related moc file, and receive 
> "undefined reference to
> `SampleClass::sampleSignal(int)'"
> error.
> 
> I sure the compiler goes to it, so any syntax error within
> it, is reported:
> #ifdef unix  
>   : 
> #endif
> 
> at the being time, I changed "#ifdef unix" to
> "#ifndef win32", to overcome the problem.
> 
> where is the problem? is it a bug?
> 
> I use qt4.6 on ubuntu 9.10 x86
> 
> regards
> navid
> 
> 
> 
>       
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
> 
> 
> 
> 
> 
> 
> 
> 
>       


      




More information about the Qt-interest-old mailing list