I just downloaded openCV and built it using cmake, making sure to uncheck 'build sharedlibs' option.
I want to build an exe that has all the dlls required for openCV to work .
after writing a code, unless I put the opencv core dll in the same folder as my application , the application doesn't work.
also , none of the highgui functions seem to work.
what am I doing wrong ?

my .pro file :
Qt Code:
  1. QT += core
  2.  
  3. QT -= gui
  4. LIBS += -Wl,-Bstatic -Wl,-Bdynamic
  5. TARGET = untitled4
  6. CONFIG += console
  7. CONFIG -= app_bundle
  8.  
  9. TEMPLATE = app
  10. CONFIG += -static -static-libgcc
  11.  
  12. SOURCES += main.cpp
  13. INCLUDEPATH +=C:\opencv\install\include
  14.  
  15. LIBS+= G:\opencv\build\x86\vc11\bin\bin\libopencv_core247.dll
  16. LIBS+= G:\opencv\build\x86\vc11\bin\bin\libopencv_highgui247.dll
  17.  
  18. RESOURCES += \
  19. test.qrc
To copy to clipboard, switch view to plain text mode 
I tried static building option in cmake, and changing the name from .dll to .a, but its always the same problem .

I am using a static version of Qt
I followed this tutorial :
http://stackoverflow.com/questions/1...use-qt-library