Quote Originally Posted by sfabel View Post
In particular, I have a header file "m.h" like the following:
Qt Code:
  1. ...
  2. namespace MYNAMESPACE {
  3. class M : public QObject
  4. {
  5. Q_OBJECT
  6. ....
  7. #closing bracket?
  8. }
  9. #endif
To copy to clipboard, switch view to plain text mode 
Did you miss closing bracket ('}') in the marked position? Or just missed it when posting?
From my experience with C++, such strange errors usually happen when there is a syntax error somewhere, for example missing bracket, semi-colon or smt like that.

Quote Originally Posted by sfabel View Post
Makefile:[line number]: warning: ignoring old commands for target 'moc_m.cpp'
Makefile:[line number]: warning: ignoring old commands for target 'm.o'
But most likely it seems that moc (qt's meta-object compiler) doesn't run when building for some reason, so C++ compiler tries to compile Qt-specific stuff and fails.

P.S. If data.h includes QtGlobal and QString there is no need to include them in m.h.