Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV 3.4, build with MinGW 8.1.0

I recently updated my Code::Block version which optional comes with mingw. Also updated updated OpenCV from 3.2.

CMake does fine so far, generating a Code::Block project file. But compiling OpenCV gives 5 errors (please excuse the non-formatting):

[ 41%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/sum.avx2.cpp.obj cd /d D:\Guido\develop\opencv\build\modules\core && C:\PROGRA~2\CODEBL~1\MinGW\bin\G__~1.EXE -DCVAPI_EXPORTS -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE="long long" -D_USE_MATH_DEFINES -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCV_CPU_COMPILE_AVX2=1 -DCV_CPU_COMPILE_AVX=1 -DCV_CPU_COMPILE_FMA3=1 -DCV_CPU_COMPILE_FP16=1 -DCV_CPU_COMPILE_POPCNT=1 -DCV_CPU_COMPILE_SSE4_1=1 -DCV_CPU_COMPILE_SSE4_2=1 -DCV_CPU_COMPILE_SSSE3=1 -DCV_CPU_DISPATCH_MODE=AVX2 @CMakeFiles/opencv_core.dir/includes_CXX.rsp -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG -mssse3 -msse4.1 -mpopcnt -msse4.2 -mf16c -mfma -mavx -mavx2 -o CMakeFiles\opencv_core.dir\sum.avx2.cpp.obj -c D:\Guido\develop\opencv\build\modules\core\sum.avx2.cpp

gcc: error: long: No such file or directory C:\PROGRA~2\CODEBL~1\MinGW\bin\windres.exe: preprocessing failed. mingw32-make.exe[2]: * [modules\core\CMakeFiles\opencv_core.dir\build.make:2589: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1 mingw32-make.exe[1]: [CMakeFiles\Makefile2:1686: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 mingw32-make.exe: ** [D:/Guido/develop/opencv/build/Makefile:162: all] Error 2 [ 41%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj cd /d D:\Guido\develop\opencv\build\modules\core && C:\PROGRA~2\CODEBL~1\MinGW\bin\windres.exe -O coff -DCVAPI_EXPORTS -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE="long long" -D_USE_MATH_DEFINES -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\Guido\develop\opencv\build -ID:\Guido\develop\opencv\sources\modules\core\include -ID:\Guido\develop\opencv\build\modules\core -ID:\Guido\develop\opencv\sources\3rdparty\zlib -ID:\Guido\develop\opencv\build\3rdparty\zlib -ID:\Guido\develop\opencv\sources\3rdparty\include\opencl\1.2 D:\Guido\develop\opencv\build\modules\core\vs_version.rc CMakeFiles\opencv_core.dir\vs_version.rc.obj mingw32-make.exe[2]: Leaving directory 'D:/Guido/develop/opencv/build' mingw32-make.exe[1]: Leaving directory 'D:/Guido/develop/opencv/build'

I've to admit - I don't even know where the error(s) are located in. Where is "long" not recognized etc.?

Any help much appreciated.

CodeBlocks: 20.03 mingw: MinGW-W64 8.1.0, 32/64 bit, SEH CMake: 3.8.2

OpenCV 3.4, build with MinGW 8.1.0

I recently updated my Code::Block version which optional comes with mingw. Also updated updated OpenCV from 3.2.

CMake does fine so far, generating a Code::Block project file. But compiling OpenCV gives 5 errors (please excuse the non-formatting):this:

[ 41%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/sum.avx2.cpp.obj cd /d D:\Guido\develop\opencv\build\modules\core && C:\PROGRA~2\CODEBL~1\MinGW\bin\G__~1.EXE -DCVAPI_EXPORTS -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE="long long" -D_USE_MATH_DEFINES -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCV_CPU_COMPILE_AVX2=1 -DCV_CPU_COMPILE_AVX=1 -DCV_CPU_COMPILE_FMA3=1 -DCV_CPU_COMPILE_FP16=1 -DCV_CPU_COMPILE_POPCNT=1 -DCV_CPU_COMPILE_SSE4_1=1 -DCV_CPU_COMPILE_SSE4_2=1 -DCV_CPU_COMPILE_SSSE3=1 -DCV_CPU_DISPATCH_MODE=AVX2 @CMakeFiles/opencv_core.dir/includes_CXX.rsp -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG

 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mf16c -mfma -mavx -mavx2 -o CMakeFiles\opencv_core.dir\sum.avx2.cpp.obj -c D:\Guido\develop\opencv\build\modules\core\sum.avx2.cpp

cd /d D:\Guido\Downloads\opencv-3.4.10\build\modules\core && C:\PROGRA~2\CODEBL~1\MinGW\bin\windres.exe -O coff $(RC_DEFINES) $(RC_INCLUDES) $(RC_FLAGS) D:\Guido\Downloads\opencv-3.4.10\build\modules\core\vs_version.rc CMakeFiles\opencv_core.dir\vs_version.rc.obj

gcc: error: long: No such file or directory C:\PROGRA~2\CODEBL~1\MinGW\bin\windres.exe: preprocessing failed. mingw32-make.exe[2]: * *** [modules\core\CMakeFiles\opencv_core.dir\build.make:2589: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1 mingw32-make.exe[1]: [CMakeFiles\Makefile2:1686: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 mingw32-make.exe: ** [D:/Guido/develop/opencv/build/Makefile:162: all] Error 2 [ 41%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj cd /d D:\Guido\develop\opencv\build\modules\core && C:\PROGRA~2\CODEBL~1\MinGW\bin\windres.exe -O coff -DCVAPI_EXPORTS -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE="long long" -D_USE_MATH_DEFINES -D_WIN32_WINNT=0x0601 -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\Guido\develop\opencv\build -ID:\Guido\develop\opencv\sources\modules\core\include -ID:\Guido\develop\opencv\build\modules\core -ID:\Guido\develop\opencv\sources\3rdparty\zlib -ID:\Guido\develop\opencv\build\3rdparty\zlib -ID:\Guido\develop\opencv\sources\3rdparty\include\opencl\1.2 D:\Guido\develop\opencv\build\modules\core\vs_version.rc CMakeFiles\opencv_core.dir\vs_version.rc.obj mingw32-make.exe[2]: Leaving directory 'D:/Guido/develop/opencv/build' mingw32-make.exe[1]: Leaving directory 'D:/Guido/develop/opencv/build'

I've to admit - I don't even know where the error(s) are located in. have any clue. Where is "long" not recognized etc.?

Any help much appreciated.

CodeBlocks: 20.03 20.03, mingw: MinGW-W64 8.1.0, 32/64 bit, SEH SEH, CMake: 3.8.23.17.1