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

BOUCARD Olivier boucard_olivier at yahoo.fr
Wed Dec 9 16:36:30 CET 2009


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



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091209/0f71d0fb/attachment.html 


More information about the Qt-interest-old mailing list