C++ Qt5.8.0缺少vcruntime140d_app.dll

C++ Qt5.8.0缺少vcruntime140d_app.dll,c++,qt,dll,visual-studio-2015,C++,Qt,Dll,Visual Studio 2015,我有一个非常简单的Qt应用程序,由main.cpp、mainwindow.cpp、mainwindow.h和mainwindow.ui组成。各部分内容如下: main.cpp #include "mainwindow.h" #include <QApplication> int main(int argc, char* argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.ex

我有一个非常简单的Qt应用程序,由main.cpp、mainwindow.cpp、mainwindow.h和mainwindow.ui组成。各部分内容如下:

main.cpp

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

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

  return a.exec();
}
#include "mainwindow.h"
#include "ui_mainwindow.h"

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

MainWindow::~MainWindow() {
    delete ui;
}
main window.h

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT

  public:
    explicit MainWindow(QWidget* parent = 0);
    ~MainWindow();

  private:
    Ui::MainWindow* ui;
};

#endif // MAINWINDOW_H
生成的Visual Studio 14项目编译得很好,但当我尝试运行main.exe时,首先发生的事情是它抱怨缺少Qt5Widgetsd.dll。当我从Qt目录复制它并再次尝试运行main.exe时,它会抱怨找不到vcruntime140d_app.dll。现在,我的Visual Studio安装中有vcruntime140d.dll,但我的系统中没有vcruntime140d_app.dll,在谷歌搜索之后,我似乎也找不到太多关于它的信息

有人知道这个vcruntime140d_app.dll来自哪里吗?为什么Qt5widgetsd.dll依赖于它?我如何解决这个问题


提前谢谢<ui version="4.0"> <class>MainWindow</class> <widget class="QMainWindow" name="MainWindow" > <property name="geometry" > <rect> <x>0</x> <y>0</y> <width>400</width> <height>300</height> </rect> </property> <property name="windowTitle" > <string>MainWindow</string> </property> <widget class="QMenuBar" name="menuBar" /> <widget class="QToolBar" name="mainToolBar" /> <widget class="QWidget" name="centralWidget" /> <widget class="QStatusBar" name="statusBar" /> </widget> <layoutDefault spacing="6" margin="11" /> <pixmapfunction></pixmapfunction> <resources/> <connections/> </ui>
cmake_minimum_required(VERSION 2.8.11)

project(QCameraWidget)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

find_package(Qt5Widgets REQUIRED)

include_directories(${Qt5Widgets_INCLUDES})

add_definitions(${Qt5Widgets_DEFINITIONS})

set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")

set(SOURCES
main.cpp
mainwindow.cpp
)

set(HEADERS
mainwindow.h
)

set(UIS
mainwindow.ui
)

add_executable(main ${SOURCES} ${HEADERS} ${UIS})
target_link_libraries(main ${Qt5Widgets_LIBRARIES})

IF(WIN32) # Check if we are on Windows
  if(MSVC) # Check if we are using the Visual Studio compiler
    set_target_properties(main PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
  elseif(CMAKE_COMPILER_IS_GNUCXX)
    # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows") # Not tested
  else()
    message(SEND_ERROR "You are using an unsupported Windows compiler! (Not MSVC or GCC)")
  endif()
elseif(UNIX)
  # Nothing special required
else()
  message(SEND_ERROR "You are on an unsupported platform! (Not Win32 or Unix)")
ENDIF()