Results 1 to 3 of 3

Thread: Wrong compiling result by QT!!??

  1. #1
    Join Date
    Jan 2008
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Wrong compiling result by QT!!??

    These are two of my helloworld :
    without QT class

    Qt Code:
    1. #include <iostream>
    2. int main()
    3. {
    4. std::cout<<"haha"<<std::endl;
    5.  
    6. return 0;
    7. }
    To copy to clipboard, switch view to plain text mode 

    with QT class
    Qt Code:
    1. #include <QtDebug>
    2. int main( )
    3. {
    4. qDebug() << "Hello Qt World!";
    5. return 0;
    6. }
    To copy to clipboard, switch view to plain text mode 
    I compiled any of these file as like:
    \qmake -project
    ......
    \qmake
    ......
    \make
    ......

    There is no any error ,but when I run the helloworld.exe,there is no out !!!???
    why!

    Is there any bug with QT?!
    Last edited by marcel; 13th January 2008 at 13:42. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2008
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Wrong compiling result by QT!!??

    But I use MS VC6 compiled the first helloworld,I got the right output!

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Wrong compiling result by QT!!??

    Add CONFIG += console to your .pro file and re-run "qmake" and "make".

  4. The following user says thank you to jacek for this useful post:

    greenoaktree (13th January 2008)

Similar Threads

  1. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

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.