title: Error when compiling OpenCV for Qt
body: <p>In order to use OpenCV in Qt, I have to compile it with MinGW by cmake.</p>
  
  <p>Software are the following:</p>
  
  <ul>
  <li>Qt 5.4.0</li>
  <li>Opencv 2.4.11</li>
  <li>CMake 3.2.2</li>
  <li>MinGW version unknown, GCC 4.8.1</li>
  </ul>
  
  <p>A fatal error occurred when I make file and I have no idea how to solve it at all.</p>
  
  <pre><code>[ 29%] Automatic moc for target opencv_highgui
  Generating moc_window_QT.cpp
  Exit code 0xc000007b
  
  AUTOGEN: error: process for C:/opencvbuild/modules/highgui/moc_window_QT.cpp failed:
  Exit code 0xc000007b
  
  moc failed...
  modules\highgui\CMakeFiles\opencv_highgui_automoc.dir\build.make:48: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_automoc' failed
  mingw32-make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui_automoc] Error 1
  
  CMakeFiles\Makefile2:2066: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_automoc.dir/all' failed
  mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui_automoc.dir/all] Error 2
  Makefile:145: recipe for target 'all' failed
  mingw32-make: *** [all] Error 2
  </code></pre>
  
  <p>These messages are shown in cmd.</p>
  
  <p>Then I revised CMakeLists.txt, SET(CMAKE_AUTOMOC OFF) </p>
  
  <pre><code>modules\highgui\CMakeFiles\opencv_highgui_automoc.dir\build.make:64: recipe for target 'modules/highgui/qrc_window_QT.cpp' failed
  </code></pre>
  
  <p>Does anybody know a solution?</p>