[SOLVED]Linking to OpenCV 2.3.1 using OpenCV-2.3.0-win-superpack.exe built dlls in Qt project on Windows
Let me describe next situation and exchange experience/ask for help:
I use :
cvCreateVideoWriter ( ), cvReleaseVideoWriter ( ) functions
for that I've installed ( actually unpacked ) latest OpenCV pack with prebuilt .dll for x86 for mingw :
( superpack )
I've unpacked the superpack to D:/opencv directory.
Next lines've been added to .pro file :
@LIBS += D:\opencv\opencv\build\x86\mingw\bin*.dll
INCLUDEPATH += D:\opencv\opencv\include
and next header includes :
The project is succ. built on Windows XP but when I run it from the directory with the opencv's .dlls I get next error :
Entry point not found : "The procedure entry point_ZNSt9exceptionD2Ev could not be located in the dynamic link library"
Does anybody know why such a problem ? How to fix/repair ?
As I understood from previous disccussions on the same topic :
the problem is that opencv sources should be built using CMake for further specific compile system MinGW or MSVisual studio. But the superpack version already contains prebuilt for MinGW that can be used ,right ?
Also whether SSE / SSE2 options are needed to take into considerations ?
Perhpas I'll find later the solution but nevertheless I ask also here to share and perhaps to find elegant way together.Thanks for possible clear help to workout/find out simple clear elegant solution in order to use OpenCV in Qt projects.
If you add some path to INCLUDEPATH, you won't have to use full path in #include.
"The procedure entry point" error usually occurs when you have wrong dll file. Did you accidentally copy VS's dll files (not MinGW's) to your executable's directory?
Thanks Latexi95 - you are right concerns includes and dll'.
Now I've solved the problem by generating the opencv needed dll's by building for my platform using cmake + mingw and running with that built by cmake + mingw dlls.
I need a help. I am trying to integrate the opencv2.3 with qt in ubuntu 11.04 but I got one error.
The following is the Application output:
OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in cvGetMat, file /home/krishanu/OpenCV-2.3.0/modules/core/src/array.cpp, line 2482
terminate called after throwing an instance of 'cv::Exception'
what(): /home/krishanu/OpenCV-2.3.0/modules/core/src/array.cpp:2482: error: (-206) Unrecognized or unsupported array type in function cvGetMat
The program has unexpectedly finished.
/home/krishanu/Hello-build-desktop/Hello exited with code 0"
This is my source code:
This is my.pro file
Project created by QtCreator 2012-05-14T18:08:31
QT += core
QT -= gui
TARGET = Hello
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
LIBS+=-lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
It would be of great help if someone would could help me.Thanks in advance.