harvey_slash
15th December 2013, 17:00
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 += core
QT -= gui
LIBS += -Wl,-Bstatic -Wl,-Bdynamic
TARGET = untitled4
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
CONFIG += -static -static-libgcc
SOURCES += main.cpp
INCLUDEPATH +=C:\opencv\install\include
LIBS+= G:\opencv\build\x86\vc11\bin\bin\libopencv_core247 .dll
LIBS+= G:\opencv\build\x86\vc11\bin\bin\libopencv_highgui 247.dll
RESOURCES += \
test.qrc
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/15881913/how-to-link-opencv-in-qtcreator-and-use-qt-library
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 += core
QT -= gui
LIBS += -Wl,-Bstatic -Wl,-Bdynamic
TARGET = untitled4
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
CONFIG += -static -static-libgcc
SOURCES += main.cpp
INCLUDEPATH +=C:\opencv\install\include
LIBS+= G:\opencv\build\x86\vc11\bin\bin\libopencv_core247 .dll
LIBS+= G:\opencv\build\x86\vc11\bin\bin\libopencv_highgui 247.dll
RESOURCES += \
test.qrc
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/15881913/how-to-link-opencv-in-qtcreator-and-use-qt-library