[Qt-interest] Simple Hello World won't work

Scott Aron Bloom Scott.Bloom at sabgroup.com
Sun Mar 8 03:21:29 CET 2009


Make sure you have the console turned on...

The default project results from qmake are built against the windows
subsystem libraries and not the console ones.

Scott

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Mike Adolf
Sent: Saturday, March 07, 2009 5:56 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Simple Hello World won't work

Why won't this work in Windows Vista.  After a successful make, the 
following doesn't produce any output when run from a command prompt.
-------------------------------------------------------
#include <QApplication>
#include <QTextStream>

int main(int argc, char **argv){
  QTextStream cout(stdout, QIODevice::WriteOnly);
  cout << "Hello World\n";
  return 0;
}
--------------------------------------------------------

A similar c++, without the Qt stuff works fine.

Mike
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list