Results 1 to 5 of 5

Thread: Nothing to be done for `first'.

  1. #1
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    1

    Default Nothing to be done for `first'.

    I'm trying to compile my first QT programme but i came across a pretty popular problem, which I can't solve even after browsing this forum.
    This is the code I am using:
    Qt Code:
    1. #include <QCoreApplication>
    2. #include <QDebug>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6.  
    7. QCoreApplication a(argc, argv);
    8. qDebug() << "hello";
    9. return a.exec();
    10. }
    To copy to clipboard, switch view to plain text mode 

    After trying to build it i get this 'error':

    C:/MinGW/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/Users/Max/Desktop/tutajjestQT/hello-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'
    mingw32-make[1]: Nothing to be done for `first'.
    mingw32-make[1]: Leaving directory `C:/Users/Max/Desktop/tutajjestQT/hello-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug'

    And w window with "Naci" written in it in which, later on, i can later whatever i want:
    QT.jpg

    Can anyone help me with what's wrong, please?

  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: Nothing to be done for `first'.

    There is no error, or even warning, there. The message is from your make utility telling you it determined that the compiled program did not need to be recompiled because it was newer than the source files that go into it.

    The window comes from running the program in Qt Creator (I am assuming you are using that) which, by default for non-GUI applications, will run the program in a terminal. It normally contains your program's console output and ends with a message like "Press Enter to close" once the program terminates. However, your program does not run to completion because you enter the event loop (line 9) and will need to use Ctrl-C or similar to terminate it.

    Try replacing line 9 with:
    Qt Code:
    1. return 0;
    To copy to clipboard, switch view to plain text mode 

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

    IdontExist (26th April 2013)

  4. #3
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    1

    Default Re: Nothing to be done for `first'.

    Yes, I am using Qt Creator and i tried to make an console application.
    I replaced line 9 with the code You gave me but nothing changed.

  5. #4
    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: Nothing to be done for `first'.

    Post your PRO file and do a clean rebuild of the program.

  6. #5
    Join Date
    Apr 2013
    Posts
    3
    Thanks
    1

    Default Re: Nothing to be done for `first'.

    This is my hello.pro file:
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2013-04-25T20:30:08
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT += core
    8.  
    9. QT -= gui
    10.  
    11. TARGET = hello
    12. CONFIG += console
    13. CONFIG -= app_bundle
    14.  
    15. TEMPLATE = app
    16.  
    17.  
    18. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 

    I also did a full rebuild of my programme.

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
  •  
Qt is a trademark of The Qt Company.