Visual Studio 2013 does not start the program due to ucrtbased.dll

I unpacked OpenCV registered a variable and path made settings in the project, nothing glows red - when compiling the error

Ucrtbased.dll not found, reinstall the program vs2013, win 8.1

And a bunch more in the console. What am I doing wrong?

#include "stdafx.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>



using namespace cv;
using namespace std;

int main(int argc, char** argv)
{


    Mat image;
    image = imread("icecream.jpg", 1);   // Read the file

    if (!image.data)                              // Check for invalid input
    {
        cout << "Could not open or find the image" << std::endl;
        return -1;
    }

    namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
    imshow("Display window", image);                   // Show our image inside it.

    waitKey(0);                                          // Wait for a keystroke in the window
    return 0;
}
  • 'ConsolCV.exe' (Win32): Loaded 'C:\VS2013\11\ConsolCV\x64\Debug\ConsolCV.exe'. Symbols loaded.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\opencv330\build\x64\vc14\bin\opencv_world330d.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcp120d.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcr120d.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\msvfw32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\avifil32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\avicap32.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\concrt140d.dll'. Cannot find or open the PDB file.
  • 'ConsolCV.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
  • The program '[4896] ConsolCV.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
Author: Mikhailo, 2017-10-23

1 answers

ucrtbased.dll - this is a library related to a Windows 10 component called Universal CRT.

His absence means two things:

  1. Your OS is Windows 8.1 or lower.
  2. When installing the studio, you forgot to mark the components Windows Universal C Runtime and Windows 10 SDK, or unknowingly unchecked them:

    Screenshot of the Microsoft Visual Studio installer

Important: for the correct installation of Universal C Runtime , you must availability of update KB2999226 "Update for the universal C runtime in Windows".

However, further distribution of your application will also require the installation of this runtime environment, as well as the specified update and all its dependencies. So the alternative is to roll back to earlier versions of Visual Studio that are not tied to Windows 10, or use some alternative compiler (for example, MinGW-x64) instead built-in cl.

P. S: as stated in one of the answers to En.SO, the express version of the studio may not contain the specified components. Then you will need to install a separate Windows 10 SDK.

 1
Author: Arhadthedev, 2017-10-24 05:39:18