I get a crash when try to create a QApplication object. This is my code:
#include <QLabel>
#include <QApplication>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
return app.exec();
}
I am using Qt version 4.8.4 and the MinGW compiler. My application crashes when running QCoreApplicationPrivate::processCommandLineArguments method. Can anybody tell how to solve this problem?
Apparently, this error is caused by binary incompatibility of Qt binaries and your compiler.
From here:
If you are using gcc 4.7 (I think this is the default version with the latest MinGW), you can’t compile (well, you can, but it will not work) with Qt 4 precompiled binaries.
So, either downgrade your gcc to 4.4 version, or upgrade Qt to latest (Qt 5) version.