Results 1 to 2 of 2

Thread: MOC doesn't generate files

  1. #1
    Join Date
    May 2013
    Posts
    3
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default MOC doesn't generate files

    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.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: MOC doesn't generate files

    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.

Similar Threads

  1. Replies: 1
    Last Post: 18th October 2011, 17:53
  2. QMake how to let UIC generate BOTH header and source files?
    By timewolf in forum Qt Tools
    Replies: 2
    Last Post: 17th August 2011, 15:27
  3. Generate the .ts files for translation
    By skuallpa in forum Qt Programming
    Replies: 0
    Last Post: 17th June 2009, 12:22
  4. How to generate .lib files during a build?
    By QTInfinity in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd October 2008, 18:56
  5. Replies: 4
    Last Post: 9th June 2006, 20:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.