Results 1 to 3 of 3

Thread: :: error: No rule to make target

  1. #1
    Join Date
    Mar 2011
    Posts
    24
    Thanks
    1
    Thanked 3 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default :: error: No rule to make target

    :: error: No rule to make target `debug/loginwindow.moc', needed by `debug/loginwindow.o'. Stop.


    I am a newbie to Qt and i keep getting this error... i know this a silly error and i am overlooking some where, but please help me out and guide me on this.

    well i have seen my .pro file where i included the header file (loginwindow.h)

    and my loginwindow.cpp contains #include "loginwindow.moc"

    My loginwindow.h contains the Q_OBJECT macro

    i went across the thread where chisW67 made a post which i could follow.

    thanx in advance...

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: :: error: No rule to make target

    My loginwindow.h contains the Q_OBJECT macro
    and my loginwindow.cpp contains #include "loginwindow.moc"
    You don't need to #include moc_* if you have defined the class in header file, which gets moc'ed ( so meta-object code is generated and compiled with other project sources )
    Try to clean the project:
    Qt Code:
    1. make clean
    2. qmake
    3. make
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to stampede for this useful post:

    drhex (18th September 2011)

  4. #3
    Join Date
    Mar 2011
    Posts
    24
    Thanks
    1
    Thanked 3 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: :: error: No rule to make target

    My man thanx dude

Similar Threads

  1. Replies: 1
    Last Post: 5th March 2011, 18:23
  2. No rule to make target
    By Coolname007 in forum Qt Programming
    Replies: 6
    Last Post: 4th March 2011, 20:08
  3. building for symbian device error: No rule to make target `MAKEFILE_0XE587C205.MK'
    By alireza.mirian in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 5th January 2011, 18:40
  4. Unable to debug simple Qt application on any of the target?
    By linux.devil in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd October 2010, 05:29
  5. No rule to make target?
    By walsha3000 in forum Qt Programming
    Replies: 1
    Last Post: 2nd July 2010, 05:42

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.