title: OpenCV2.3 and QT compile problem
body: <p>After referring to the following question, it was a flick to setup QT4.7.0, QtCreator 2.0.0 for openCV2.3</p>
  
  <p><a href="https://stackoverflow.com/questions/6726026/using-opencv-2-3-with-qt-in-qtcreator">OpenCV2.3 and QTCreator</a> 
  Now, I keep getting the following error and more for all the OpenCV functions that I try to use, despite, Qt's own intellisense showing me the functions as I type.</p>
  
  <p>undefined reference to cv::imread("img.jpg")
  undefined reference to cv::namedWindow("window")</p>
  
  <p>What am I doing wrong here?</p>
  
  <p>Using Win7 X86 on a intel core 2 Duo machine.</p>
  
  <p>.Pro file contains the following</p>
  
  <pre><code>#-------------------------------------------------
  #
  # Project created by QtCreator 2011-08-28T00:44:27
  #
  #-------------------------------------------------
  
  QT       += core
  
  QT       -= gui
  
  TARGET = myQtConsoleProject
  CONFIG   += console
  CONFIG   -= app_bundle
  
  TEMPLATE = app
  
  
  SOURCES += main.cpp
  
  
  INCLUDEPATH += H:/OpenCV2.3/build/include
  INCLUDEPATH += H:/OpenCV2.3/build/include/opencv
  
  
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_calib3d230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_contrib230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_core230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_features2d230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_flann230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_highgui230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_imgproc230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_objdetect230.lib
  LIBS += H:/OpenCV2.3/build/x86/vc9/lib/opencv_video230.lib
  </code></pre>
  
  <p>And the errors I get are as follows</p>
  
  <pre><code>debug/main.o: In function `main': 
  G:\QT Projects\myQtConsoleProject-build-desktop/../myQtConsoleProject/main.cpp:6: undefined reference to `cv::imread(std::string const&amp;, int)' 
  G:\QT Projects\myQtConsoleProject-build-desktop/../myQtConsoleProject/main.cpp:7: undefined reference to `cv::namedWindow(std::string const&amp;, int)' 
  G:\QT Projects\myQtConsoleProject-build-desktop/../myQtConsoleProject/main.cpp:8: undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&amp;)' 
  G:\QT Projects\myQtConsoleProject-build-desktop/../myQtConsoleProject/main.cpp:8: undefined reference to `cv::imshow(std::string const&amp;, cv::_InputArray const&amp;)' 
  G:\QT Projects\myQtConsoleProject-build-desktop/../myQtConsoleProject/main.cpp:9: undefined reference to `cv::waitKey(int)' 
  debug/main.o: In function `~Mat': 
  h:/OpenCV2.3/build/include/opencv2/core/mat.hpp:297: undefined reference to `cv::fastFree(void*)' 
  debug/main.o:h:/OpenCV2.3/build/include/opencv2/core/mat.hpp:381: undefined reference to `cv::Mat::deallocate()' 
  collect2: ld returned 1 exit status 
  mingw32-make[1]: *** [debug\myQtConsoleProject.exe] Error 1 
  mingw32-make: *** [debug] Error 2 
  The process "E:/Qt/2010.04/mingw/bin/mingw32-make.exe" exited with code %2.
  Error while building project myQtConsoleProject (target: Desktop)
  When executing build step 'Make'
  </code></pre>
  
  <p><strong><em>UPDATE:</em></strong>
  As <a href="https://stackoverflow.com/users/894321/alexisdm">Alexdim</a> had pointed out that I would require to rebuild OpenCV if Qt was still unable to recognize the functions, it turned out to be true. As an answer to this question. Rebuild OpenCV under WIN7 x86. I used minGW for my correction of the problem. May be this needs to be done for VC++ as well. Anyway... lucky to be able to use OpenCV and Qt now!</p>