Results 1 to 2 of 2

Thread: No rule to make target?

  1. #1
    Join Date
    Feb 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default No rule to make target?

    I created a new project using qmake -project.
    Oddly, I get the following error when trying to compile:
    no rule to make target 'debug/abstractinfodock.moc'

    I looked at other projects that compile fine and I see that
    when a file needs a MOC intermediate, qt creates a file
    called moc_filename.cpp and is happy.

    I checked the .pro file and the makefile and they both look
    just like those in projects where I have no problem.

    Can anyone toss me a clue?

    many thanks,
    Andy

  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: No rule to make target?

    Does the declaration in abstractinfodock.h include the Q_OBJECT macro (or does the cpp file #include "abstractinfodock.moc")? This triggers creation of a rule to make the moc file. Run qmake again if you change these.

Similar Threads

  1. How to change completion rule of QCompleter
    By freud in forum Qt Programming
    Replies: 8
    Last Post: 14th July 2021, 17:22
  2. Replies: 4
    Last Post: 18th April 2010, 00:37
  3. What is the general rule for onX methods in Qt?
    By piotr.dobrogost in forum Qt Programming
    Replies: 8
    Last Post: 17th August 2009, 23:10
  4. mingw32-make : multiple target patterns error
    By tsemer in forum Installation and Deployment
    Replies: 2
    Last Post: 6th November 2007, 14:54
  5. QSvgRenderer fill rule always evenOdd with gradient
    By mr.costa in forum Qt Programming
    Replies: 0
    Last Post: 24th April 2007, 17:04

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.