Hello!

Recently began to learn QT. Installed qt 4.8.4, qt creator 2.6.1 and the MinGW compiler. The very text of a simple program:

#include <QCoreApplication> #include <iostream> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); std::cout << "Hello, world!" << std::endl; return a.exec(); } 

Whichever compiler I use (I tried different versions of minGW and even the compiler from MVS), the same error comes out:

 Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly 

If QCoreApplication is not used, then the project is compiled and run normally. But in this case, there is no point in QT, in fact.

What to do to solve this problem?

  • Judging by the documentation, such an error occurs, there is an attempt to use a non-initialized variable. I am confused by the presence of std::cout in your code. This is not a standard Qt's helloworld. - KoVadim

2 answers 2

Most likely, either something was installed incorrectly, or something was not delivered. Did not try to remove Qt and install again? By the way, what OS? I compiled your code using Qt 4.8.6 and MinGW for windows 7. Everything worked out as expected.

    Hello, World with the first widget and debug output. In general, Qt does not recognize std threads.

     #include <QApplication> #include <QLabel> #include <QtDebug> int main(int argc, char *argv[]) { QApplication a(argc, argv); qDebug() << "Hello, World!"; QLabel* lbl = new QLabel("Hello, World!"); lbl->show(); return a.exec(); } 

    Or, if you want to use std, then in the pro-file you need to connect:

     CONFIG += console 

    But it is necessary to write std::endl everywhere during output, i.e.

     #include <QApplication> #include <iostream> int main(int argc, char *argv[]) { QApplication a(argc, argv); std::cout << "Hello, World" << std::endl; return a.exec(); }