title: setting up OpenCV 2.4.2 with Qt Creator
body: <p>I tried two methods to use opencv with qt creator
  first one using Mingw where the dlls and .dll.a files are already downloaded with the opencv library and I just add reference to the .dll.a files in the .pro file as follow</p>
  
  <pre><code>INCLUDEPATH += D:\\OpenCV\\opencv\\build\\include
  LIBS += D:\\OpenCV\\opencv\\build\\x64\\mingw\\lib\\libopencv_calib3d242.dll.a
  LIBS += D:\\OpenCV\\opencv\\build\\x64\\mingw\\lib\\libopencv_contrib242.dll.a
  LIBS += D:\\OpenCV\\opencv\\build\\x64\\mingw\\lib\\libopencv_core242.dll.a
  LIBS += D:\\OpenCV\\opencv\\build\\x64\\mingw\\lib\\libopencv_features2d242.dll.a
  </code></pre>
  
  <p>I have a simple code to test opencv:</p>
  
  <pre><code>#include &lt;QtCore/QCoreApplication&gt;
  #include &lt;opencv/cv.h&gt;
  
  using namespace cv;
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
      Mat image;
  
      return a.exec();
  }
  </code></pre>
  
  <p>but I got a build issues as follow</p>
  
  <blockquote>
    <p>C:\Users\Kato\Documents\QT projects\QtOpenCVYaRab\debug\main.o:-1: In function <code>~Mat':
    d:\OpenCV\opencv\build\include\opencv2\core\mat.hpp:278: error: undefined reference to</code>cv::fastFree(void*)'
    d:\OpenCV\opencv\build\include\opencv2\core\mat.hpp:367: error: undefined reference to `cv::Mat::deallocate()'
    :-1: error: collect2: ld returned 1 exit status</p>
  </blockquote>
  
  <p>Here is some of the compile output:</p>
  
  <pre><code>Running build steps for project QtOpenCVYaRab...
  Configuration unchanged, skipping qmake step.
  Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe" 
  C:/QtSDK/mingw/bin/mingw32-make -f Makefile.Debug
  mingw32-make[1]: Entering directory `C:/Users/Kato/Documents/QT projects/QtOpenCVYaRab'
  g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL
  
   d:/OpenCV/opencv/build/include/opencv2/core/mat.hpp:278: undefined reference to `cv::fastFree(void*)'
  debug/main.o:d:/OpenCV/opencv/build/include/opencv2/core/mat.hpp:367: undefined reference to `cv::Mat::deallocate()'
  collect2: ld returned 1 exit status
  mingw32-make[1]: *** [debug\QtOpenCVYaRab.exe] Error 1
  mingw32-make: *** [debug] Error 2
  The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
  Error while building project QtOpenCVYaRab (target: Desktop)
  When executing build step 'Make'
  </code></pre>
  
  <p>the second method is using cmake to compile the opencv library the using visual studio 2010 to build it and add references to the files in the bin folder but I got almost the same building issues.</p>