title: Linking opencv ".a" libraries with mingw and Qt 5.0
body: <p>This one is tough ! Please don't mistake this for a newbie question ;) I have far too many miles in this OpenCV + MinGW static stuff for the simple mistakes....</p>
  
  <p>Environment:
  a. Qt 5.0.1 built with MinGW (the standard opensource download from qt-project) - so everything is built with the same MinGW environment.
  b. Using CMake I setup minimal build (using the same g++/gcc as Qt) and turned OFF SHARED_LIBRARIES.
  c. generated the cmake + mingw32-make + mingw32-make install works fine. </p>
  
  <p><strong>up till here everything looks pretty smooth ...</strong></p>
  
  <p>Now when I added:</p>
  
  <pre><code>win32-g++:INCLUDEPATH += D:/Dev/opencv/build/install/include
  win32-g++:LIBS += -LD:/Dev/opencv/build/install/lib
  win32-g++:LIBS += -static
  win32-g++:LIBS += -llibopencv_core243d
  win32-g++:LIBS += -llibopencv_imgproc243d
  win32-g++:LIBS += -llibopencv_highgui243d
  </code></pre>
  
  <p>(and also without the "win32-g++" addition..)</p>
  
  <p>I get <code>d:/dev/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -llibopencv_highgui243d</code></p>
  
  <pre><code>...
  ...
  </code></pre>
  
  <p><strong>now.. I do have libopencv_highgui243d.a in the right directory, but the ld.exe linker is ignoring anything else than a lib ! which supposed to be a MS library (which I wanted to avoid in the first place!!!) - I even tried to rename the .a files to .lib which caused the linker to regard the files, but show many "unreferenced" errors...</strong></p>
  
  <p>So who's to blame? the linker? CMake? mingw? Qt? .... </p>
  
  <p>I tried many command line / flag options but without success ..</p>