title: Qt5.8.0 missing vcruntime140d_app.dll
body: <p>I have a very simple Qt application consisting of main.cpp, mainwindow.cpp, mainwindow.h and mainwindow.ui. The contents of each are shown below:</p>
  
  <p><strong>main.cpp</strong></p>
  
  <pre><code>#include "mainwindow.h"
  #include &lt;QApplication&gt;
  
  int main(int argc, char* argv[]) {
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
  
    return a.exec();
  }
  </code></pre>
  
  <p><strong>mainwindow.cpp</strong></p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  
  MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWindow) {
      ui-&gt;setupUi(this);
  }
  
  MainWindow::~MainWindow() {
      delete ui;
  }
  </code></pre>
  
  <p><strong>mainwindow.h</strong></p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  
  namespace Ui {
  class MainWindow;
  }
  
  class MainWindow : public QMainWindow {
      Q_OBJECT
  
    public:
      explicit MainWindow(QWidget* parent = 0);
      ~MainWindow();
  
    private:
      Ui::MainWindow* ui;
  };
  
  #endif // MAINWINDOW_H
  </code></pre>
  
  <p><strong>mainwindow.ui</strong></p>
  
  <pre><code>&lt;ui version="4.0"&gt;
   &lt;class&gt;MainWindow&lt;/class&gt;
   &lt;widget class="QMainWindow" name="MainWindow" &gt;
    &lt;property name="geometry" &gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;0&lt;/y&gt;
      &lt;width&gt;400&lt;/width&gt;
      &lt;height&gt;300&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name="windowTitle" &gt;
     &lt;string&gt;MainWindow&lt;/string&gt;
    &lt;/property&gt;
    &lt;widget class="QMenuBar" name="menuBar" /&gt;
    &lt;widget class="QToolBar" name="mainToolBar" /&gt;
    &lt;widget class="QWidget" name="centralWidget" /&gt;
    &lt;widget class="QStatusBar" name="statusBar" /&gt;
   &lt;/widget&gt;
   &lt;layoutDefault spacing="6" margin="11" /&gt;
   &lt;pixmapfunction&gt;&lt;/pixmapfunction&gt;
   &lt;resources/&gt;
   &lt;connections/&gt;
  &lt;/ui&gt;
  </code></pre>
  
  <p>I'm using CMake to generate a Visual Studio 14 32-bits application and my CMakeLists.txt looks like this:</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>The generated Visual Studio 14 project compiles fine, but when I try to run main.exe the first thing that happens is that it complains about Qt5Widgetsd.dll missing. When I copy that from the Qt directory and try to run main.exe again, it complains about not finding vcruntime140d_app.dll. Now, I have vcruntime140d.dll in my Visual Studio installation, but I don't have vcruntime140d_app.dll anywhere on my system and after googling around I can't seem to find much about it either.</p>
  
  <p>Does anyone know where this vcruntime140d_app.dll comes from, why Qt5widgetsd.dll depends on it and how I could resolve this issue?</p>
  
  <p>Thanks in advance!</p>