Ask Your Question

Revision history [back]

opencv fails compile on: system.cpp:832:13 - close(fd) not declared in this scope

System is: windows 10, cygwin

[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernels_core.cpp.o
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/convert.sse4_1.cpp.o
/c/_commonShare/opencv-3.4.1/modules/core/src/system.cpp: In function ‘cv::String cv::tempfile(const char*)’:
/c/_commonShare/opencv-3.4.1/modules/core/src/system.cpp:832:13: error: ‘close’ was not declared in this scope
     close(fd);
             ^
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/build.make:1770: modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1457: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [Makefile:161: all] Error 2

Anyone faced such a problem before?