Link dump of issues faced and their resolutions for compiling with mingw. Edit: The final product is posted at https://hnsws.blogspot.com/2020/04/building-opencv-349-windows-32-bit.html and the related github repo is https://github.com/hn-88/opencvpatch
1. mingw compile and log on to appveyor build machine - some tips are at https://github.com/symengine/symengine/blob/master/appveyor.yml
2. avoiding windows paths backslash problems in python - using raw strings - https://lerner.co.il/2018/07/24/avoiding-windows-backslash-problems-with-pythons-raw-strings/
3. For specifying make https://stackoverflow.com/questions/6141608/cmake-make-program-not-found
Setting env var with powershell https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-powershell-1.0/ff730964(v=technet.10)?redirectedfrom=MSDN
need to open a new shell if setting on machine as a whole and not for session.
manually may need to set as per https://stackoverflow.com/questions/41918477/how-to-build-opencv-3-2-0-with-mingw-on-windows
failed to set bitness, solved with -G as below.
working cmake command was
cmake -D"CMAKE_MAKE_PROGRAM:PATH=C:\Qt\Tools\mingw730_32\bin\make.exe" -G "Nmake Makefiles" ..
from
(by creating a build directory inside opencv directory, cd build.)
Done in powershell.
Failed with CMake Error: Could not create named generator Nmake Makefiles
Went forward with MinGW Makefiles.
4. For error with sprintf, http://www.programmersought.com/article/3109513497/ says: modify E:\OpenCV_3.3.1\opencv\sources\modules\videoio\src\cap_dshow.cpp, at
#include "DShow.h"
Add a line above that line
#define NO_DSHOW_STRSAFE like:
#define NO_DSHOW_STRSAFE
#include "DShow.h"
Then,
make
and it started from where it left off.
Edit: The final product is posted at https://hnsws.blogspot.com/2020/04/building-opencv-349-windows-32-bit.html and the related github repo is https://github.com/hn-88/opencvpatch
No comments:
Post a Comment