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

navid navid n_nnavid at yahoo.com
Wed Dec 9 16:19:03 CET 2009


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



      



More information about the Qt-interest-old mailing list