Ask Your Question

convoluted's profile - activity

2018-03-28 04:33:57 -0600 marked best answer Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Hi all. Been struggling with this all day. I'm working on compiling OpenCV 3.4.1 with Python 3.6.4 (32-bit) and Qt 5.10.1 support using MinGW 5.3.0 (32-bit) on Windows 10 64-bit. I'm compiling from OpenCV sources directly and using MinGW provided alongside Qt5.

I've trimmed many of the options in CMake, but kept the following checked:

BUILD_JPEG
BUILD_PNG
BUILD_SHARED_LIBS
BUILD_opencv_*
ENABLE_OMIT_FRAME_POINTER
ENABLE_PIC
OPENCL_FOUND
USE_WIN32_FILEIO
WITH_DIRECTX
WITH_DSHOW
WITH_FFMPEG
WITH_JPEG
WITH_OPENGL
WITH_PNG
WITH_QT
WITH_VFW
WITH_WIN32UI

I had to make one small fix to cap_dshow.cpp, but aside from that the build goes well and the OpenCV DLL's can be found in "C:\OpenCV\opencv-3.4.1-release\install\x86\mingw\bin". Qt5 w/ OpenCV works perfect. I also have "cv2.cp36-win32.pyd" in C:\Python\Python36-32\Lib\site-packages.

When I launch Python 3.6.4 and run "import cv2" I get one of the following:

ImportError: DLL load failed: %1 is not a valid Win32 application
ImportError: DLL load failed: The specified module could not be found

I'm not sure why I'm getting DLL dependency issues. Everything is for 32-bit as far as I can tell, and has been added to my system path.

I also tried DependencyWalker on cv2.cp36-win32.pyd, and it shows that several DLLs are missing, such as API-MS-WIN-CORE-APIQUERY-L1-1-0.DLL. There's also several that are found in my 64-bit MikTex install. Not sure if this matter, but though I'd toss it out there.

Any help would be appreciated. Thanks!

2018-03-28 04:15:24 -0600 commented question Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Right, makes sense. Also, I went back to try building with shared libs and everything works fine as well. Thanks!

2018-03-28 03:34:18 -0600 commented question Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Ok, I think I've come up with something. Looking again at DependencyWalker, I notice that some Qt5 files were marked wit

2018-03-28 02:24:17 -0600 commented question Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Just gave it a try. Re-ran over the last build using the same settings except BUILD_SHARED_LIBS = False. It completed ju

2018-03-28 01:40:52 -0600 edited question Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Building OpenCV w/ Python 3 + Qt5 Support - DLL problems Hi all. Been struggling with this all day. I'm working on compi

2018-03-28 01:39:46 -0600 edited question Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Building OpenCV w/ Python 3 + Qt5 Support - DLL problems Hi all. Been struggling with this all day. I'm working on compi

2018-03-28 01:30:06 -0600 received badge  Editor (source)
2018-03-28 01:30:06 -0600 edited question Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Building OpenCV w/ Python 3 + Qt5 Support - DLL problems Hi all. Been struggling with this all day. I'm working on compi

2018-03-28 01:17:38 -0600 asked a question Building OpenCV w/ Python 3 + Qt5 Support - DLL problems

Building OpenCV w/ Python 3 + Qt5 Support - DLL problems Hi all. Been struggling with this all day. I'm working on compi