PDA

View Full Version : MOC doesn't generate files



Gera777
10th May 2013, 11:51
Hello.

I have a problem building a solution. For some projects in the solution MOC works fine. But there is one project for which I receive warning and an error as result:

standard input(0): Note: No relevant classes found. No output generated.
c1xx : fatal error C1083: Cannot open source file: '.Moc\moc_REChooseLoc.cpp': No such file or directory

And there are such messages for each class that uses moc'ing in this project. All these classe has Q_OBJECT macro and uses signal/slots functionality.
I've tried clean/rebuild and qmake and so on. I'm out of variants.

I use Qt 4.8.4 and VS2010.

I'll be very grateful for any hint! Thanks.

P.S. I also receive such warning:
warning MSB8017: A circular dependency has been detected while executing custom build commands for item ".Moc\qteditorf.moc". This may cause incremental build to work incorrectly.
I don't know if this is relevant.

ChrisW67
10th May 2013, 21:25
Without knowing which file moc is processing when it complains of no suitable classes, and what it contains, we really cannot help. That file almost certainly contains no QObject class with Q_OBJECT macro.

The circular includes problem may be a missing include guard in one of headers.