从这里http://nuwen.net/mingw.html我已经下载了 gcc 4.7,并在 qt 中进行了设置。在 qt 中一切都可以正常编译,不幸的是,当我运行我的应用程序(从 qt)时它崩溃了。
有什么想法吗?
编辑(这是这个应用程序,操作系统 Win7,Qt 4.8):
#include <QApplication>
#include <QDialog>
int main(int c, char** v)
{
QApplication app(c,v);
QDialog* d = new QDialog();
d->show();
return app.exec();
}
最佳答案
如果更新编译器,您可能应该重新编译 Qt。
不同版本的 gcc 可以一起工作,但它们本身可能使用不兼容的选项编译。
关于c++ - QApplication 使用 gcc 4.7 编译但崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10088247/