os: windows 7
version: opencv 4.3.0
cmd:
cmake . -G "MinGW Makefiles" -B ./build -DENABLE_CXX11=ON -DOPENCV_EXTRA_MODULES_PATH=./opencv_contrib/modules -DENABLE_OPENCV_ALLOCATOR_STATS=OFF -DBUILD_SHARED_LIBS=ON -DWITH_IPP=OFF -DWITH_MSMF=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_DOCS=OFF -DENABLE_PRECOMPILED_HEADERS=OFF -DBUILD_opencv_saliency=OFF -DCPU_DISPATCH= -DOPENCV_GENERATE_PKGCONFIG=ON -DWITH_OPENCL_D3D11_NV=OFF -Wno-dev
cd build
mingw32-make -j%NUMBER_OF_PROCESSORS% && mingw32-make install
last part of log after excute the cmd
command:
mingw32-make[2]: Leaving directory 'D:/env/opencv/build'
[ 37%] Built target IlmImf
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/persistence_xml.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/persistence_yml.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/rand.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/softfloat.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/split.dispatch.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat.dispatch.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat_c.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stl.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/sum.dispatch.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.obj
[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/tables.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/trace.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/types.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/umatrix.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/utils/datafile.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/utils/filesystem.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/utils/logtagconfigparser.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/utils/logtagmanager.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/utils/samples.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/va_intel.cpp.obj
[ 38%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernels_core.cpp.obj
[ 38%] Building RC object modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj
gcc: error: long: No such file or directory
C:\msys64\mingw64\bin\windres.exe: preprocessing failed.
mingw32-make[2]: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1282: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
mingw32-make[2]: *** Waiting for unfinished jobs....
mingw32-make[2]: Leaving directory 'D:/env/opencv/build'
mingw32-make[1]: *** [CMakeFiles\Makefile2:3723: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
mingw32-make[1]: Leaving directory 'D:/env/opencv/build'
mingw32-make: *** [Makefile:179: all] Error 2