在QTCreater版本5.9.4上创建程序MSVC217 64位在运行程序时崩溃

时间:2018-09-04 08:13:25

标签: qt qt-creator

救救我!我将Qt VS Tools与运行在Windows 10上的Visual Studio 2017 Community Edition一起使用。我试图使用MSVC217 64位编译器创建一个新项目,但是该程序在运行时崩溃。默认生成的代码,未进行任何更改

  

build-untitled1-Desktop_Qt_5_9_4_MSVC2017_64bit-Debug \ debug \ untitled1.exe ...   无法检索调试输出。   该程序意外完成。   该过程被迫结束。   build-untitled1-Desktop_Qt_5_9_4_MSVC2017_64bit-Debug / debug / untitled1.exe崩溃

代码:

#include "mainwindow.h"
#include <QApplication>

int main(int argc, char *argv[])
{
  QApplication a(argc, argv);
  MainWindow w;
  w.show();

  return a.exec();
}

mainwindow.cpp

    #include "mainwindow.h"
    #include "ui_mainwindow.h"

    MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
    {
      ui->setupUi(this);
    }

  MainWindow::~MainWindow()
  {
    delete ui;
  }

0 个答案:

没有答案