title: Process finished with exit code -1073741515 (0xC0000135) after trying to run sample code using OpenCV library
body: <p>I've been trying to run <strong>OpenCV</strong> using <strong>CLion IDE</strong> under <strong>Windows</strong>. When I try to run this sample code for loading and displaying an image</p>
  
  <pre><code>#include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  #include &lt;iostream&gt; 
  using namespace cv;
  using namespace std;
  
  int main( int argc, char** argv )
  {
      if( argc != 2)
      {
       cout &lt;&lt;" Usage: display_image ImageToLoadAndDisplay" &lt;&lt; endl;
       return -1;
      }
  
      Mat image;
      image = imread("earth.jpg", CV_LOAD_IMAGE_COLOR);   // Read the file
  
      if(! image.data )                              // Check for invalid input
      {
          cout &lt;&lt;  "Could not open or find the image" &lt;&lt; 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;
  }
  </code></pre>
  
  <p>I get the error statement: </p>
  
  <blockquote>
    <p>Process finished with exit code -1073741515 (0xC0000135)</p>
  </blockquote>
  
  <p>As for the content in my <strong>CMakeLists.txt</strong>, it looks like this: </p>
  
  <pre><code>cmake_minimum_required(VERSION 3.6)
  project(test)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  
  # Where to find CMake modules and OpenCV
  set(OpenCV_DIR "C:\\opencv\\mingw-build\\install")
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
  
  find_package(OpenCV REQUIRED)
  include_directories(${OpenCV_INCLUDE_DIRS})
  
  add_executable(openCV main.cpp)
  
  # add libs you need
  set(OpenCV_LIBS opencv_core opencv_imgproc opencv_highgui opencv_imgcodecs)
  
  # linking
  target_link_libraries(openCV ${OpenCV_LIBS})
  </code></pre>
  
  <p>Thanks for helping me with this.</p>