I moved to Ubuntu recently and I can’t get openCV working with QtCreator. As described in the OpenCv install guide I built and installed the openCV library in /usr/local/lib, I updated opencv.conf in /etc/ld.so.conf.d/ and run sudo ldconfig -v.
But when I try to run a simple “hello world” program that shows an image in a namedWindow I get the following error:
OpenCv Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in cvGetMat, file /home/wedontplay/documenti/Library Installer/OpenCV-2.4.0/modules/core/array.cpp, line 2482 terminate called after throwing an instace of ‘cv::Excepton’ what(): /home/wedontplay/Library Installer/OpenCV-2.4.0/modules/core/src/array.cpp:2482: error: (-206) Unrecognized or unsupported array type in function cvGetMat
Why does Qt search in /home/wedontplay/Documenti/... instead of /usr/local/lib (it is searching in the folder where I have the OpenCv libs source code)?
Any suggestion would be really appreciated.
Add
in your
.profile and then try.include module name as, for ex if its libopencvmodule1.a ,add it as
LIBS+ = -L/usr/local/lib -lopencvmodule1