0

I am currently installing OpenCV3.4.4 in ordre to use it with Code::Blocks. I used CMake GUI to Configure and Generates the binaries.

But when I'm using 'mingw32-make' to finish the installation, an error occurs about strnlen which apparently is not define. I have the following message :

" C:\opencv\sources\modules\core\src\persistence.cpp: In function 'char* icvGets(CvFileStorage*, char*, int)': C:\opencv\sources\modules\core\src\persistence.cpp:71:46: error: 'strnlen' was not declared in this scope size_t sz = strnlen(ptr, maxCount); ^ C:\opencv\sources\modules\core\src\persistence.cpp:82:46: error: 'strnlen' was not declared in this scope size_t sz = strnlen(ptr, maxCount); ^ modules\core\CMakeFiles\opencv_core.dir\build.make:901: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/persistence.cpp.obj' failed mingw32-make[2]: * [modules/core/CMakeFiles/opencv_core.dir/src/persistence.cpp.obj] Error 1 CMakeFiles\Makefile2:1671: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed mingw32-make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2 Makefile:161: recipe for target 'all' failed mingw32-make: *** [all] Error 2"

"

I've read some other forum asking to change some variables in CMake GUI but for other issues and I did not succeed to find the same as me. I hope that someone could help me. thank you

1 Answer 1

0

If this is useful for you, I was able to compile OpenCV 3.1.0 with MinGW32.

I have not been able to compile OpenCV3.4.7 with MinGW32 (I think that this backward compatibility has been abandoned), but I succeeded to compile OpenCV3.4.7 with MinGW64.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.