How i can use OpenCV 3.0.0 on qt in Windows 10 ?
Hi,sorry for my simple question but i try to install opencv3 on qt ... I knew that i can't use prebuilt library for qt and i have to build it with mingw compiler(for it i use Cmake) but i test many ways but now i really confused, is there any way i can trust him.i use qt5.4.2
when i build opencv3 in cmnd window this error appear.
Scanning dependencies of target opencv_videoio [ 38%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap.cpp.obj [ 38%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_images.cpp.obj [ 38%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_encoder.cpp.obj [ 38%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_mjpeg_decoder.cpp.obj [ 38%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_cmu.cpp.obj [ 38%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:122:11: error: base class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-virtual-dtor] interface IEnumPIDMap : public IUnknown ^ C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:122:11: error: 'struct IEnumPIDMap' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:139:11: error: base class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-virtual-dtor] interface IMPEG2PIDMap : public IUnknown ^ C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:139:11: error: 'struct IMPEG2PIDMap' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:227:11: error: base class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-virtual-dtor] interface ISampleGrabberCB : public IUnknown ^ C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:227:11: error: 'struct ISampleGrabberCB' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:239:11: error: base class 'struct IUnknown' has accessible non-virtual destructor [-Werror=non-virtual-dtor] interface ISampleGrabber : public IUnknown ^ C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:239:11: error: 'struct ISampleGrabber' has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor] C:\OpenCV\s.3\sources\modules\videoio\src\cap_dshow.cpp:646:7: error: base class 'struct ISampleGrabberCB' has accessible non-virtual destructor [-Werror=non-virtual-dtor] class SampleGrabberCallback : public ISampleGrabberCB{ ^ cc1plus.exe: some warnings being treated as errors modules\videoio\CMakeFiles\opencv_videoio.dir\build.make:187: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj' failed mingw32-make[2]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dshow.cpp.obj] Error 1 CMakeFiles\Makefile2:4506: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed mingw32-make[1]: [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 makefile:148: recipe for target 'all' failed mingw32-make: ** [all] Error 2
but when i use opencv2.4, Cmake can built my library but when i want to link opencv to qt following error appear.
my error when i use OpenCV 2.4 in below image (picture link)
and my ...
"when i use opencv3 cmake can't make file why? " -- how would we know without seeing your errors ?
please append the cmake output to your question
btw, you should not try to link
.dll
files, but.a
(this all looks less and less like an opencv problem, but 'noob does not know, how to use ide'.Thanks to answer but i follow this tutorial and there author link .dll files.
do you really expect us to read your (non-working) tutorial ?
you have to use:
-lopencv_core
, not-llibopencv_core.dll
with mingw (same for the other libs)please no screenshots !
and you can't compile opencv with ipp using mingw32, you will have to look for the "WITH_IPP" option in cmake, and disable that
I can't file this library:( please tell me lib path
it's by default disable :(