Ask Your Question

Revision history [back]

error in builing from source for android

i have encountered an error while building opencv 4.0.1 from source to use it in android studio. After making source files using CMake and i get this error while using MinGw

[ 0%] Building C object 3rdparty/cpufeatures/CMakeFiles/libcpufeatures.dir/cpu-features.c.o In file included from E:\libraries\opencv_source\opencv-4.0.1\3rdparty\cpufeatures\cpu-features.c:64:0: E:\libraries\opencv_source\opencv-4.0.1\3rdparty\cpufeatures\cpu-features.h:31:23: fatal error: sys/cdefs.h: No such file or directory #include <sys cdefs.h=""> ^ compilation terminated. 3rdparty\cpufeatures\CMakeFiles\libcpufeatures.dir\build.make:61: recipe for target '3rdparty/cpufeatures/CMakeFiles/libcpufeatures.dir/cpu-features.c.o' failed mingw32-make[2]: * [3rdparty/cpufeatures/CMakeFiles/libcpufeatures.dir/cpu-features.c.o] Error 1 CMakeFiles\Makefile2:230: recipe for target '3rdparty/cpufeatures/CMakeFiles/libcpufeatures.dir/all' failed mingw32-make[1]: [3rdparty/cpufeatures/CMakeFiles/libcpufeatures.dir/all] Error 2 Makefile:161: recipe for target 'all' failed mingw32-make: ** [all] Error 2