Ask Your Question

Revision history [back]

installing OpenCV in windows 10 using TDM 64 bit and Codeblocks fails

Hello,

I am trying to configure opencv 'opencv-3.4.1-vc14_vc15.exe' on my CodeBlocks 17.12 through this tutorial: https://zahidhasan.github.io/2017-03-25-How-to-install-OpenCV-3.2-in-windows-10-using-MinGW-(64)-and-Codeblocks/

When I open CMake and make all required setups, I tried configure CodeBlocks - MinGW MakeFiles. After a few seconds I got this error:

CMake Error at C:/CMake/share/cmake-3.11/Modules/CMakeMinGWFindMake.cmake:12 (message): sh.exe was found in your PATH, here:

C:/Users/Mikael/Anaconda3/Library/usr/bin/sh.exe

For MinGW make to work correctly sh.exe must NOT be in your path.

Run cmake from a shell that does not have sh.exe in your PATH.

If you want to use a UNIX shell, then use MSYS Makefiles.

Call Stack (most recent call first): CMakeLists.txt:127 (project)

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage Configuring incomplete, errors occurred!

Of course, I can try delete sh.exe from my path. I am worried about my Python/Anaconda and unexpected consequences as well. Is any possibility to get working both in the same time ? Currently I am coding the most time in python. But I'm forced to consider using c / c ++ for better performance.

I have tried ignoring this problem and just try generate again. Failed logs(otherwise others fine): Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH Performing Test HAVE_CXX_WNO_IMPLICIT_FALLTHROUGH - Failed Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH Performing Test HAVE_C_WNO_IMPLICIT_FALLTHROUGH - Failed Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 Performing Test HAVE_C_WNO_SHORTEN_64_TO_32 - Failed Looking for dlfcn.h Looking for dlfcn.h - not found Check size of INT8 Check size of INT8 - failed Check size of INT16 Check size of INT16 - failed Check size of INT32 Check size of INT32 - failed Performing Test HAVE_C_WNO_MISLEADING_INDENTATION Performing Test HAVE_C_WNO_MISLEADING_INDENTATION - Failed Performing Test HAVE_C_WNO_POINTER_COMPARE Performing Test HAVE_C_WNO_POINTER_COMPARE - Failed Performing Test HAVE_C_WNO_ABSOLUTE_VALUE Performing Test HAVE_C_WNO_ABSOLUTE_VALUE - Failed Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION Performing Test HAVE_CXX_WNO_MISLEADING_INDENTATION - Failed Could not find OpenBLAS include. Turning OpenBLAS_FOUND off Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Failed Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Failed Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Failed Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD - Failed

After all, i tried build it from codeblocks and got this: build log: C:\opencv\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc:94:3: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat] return s == nullptr || s == 0; ^ C:\opencv\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc: In function 'bool google::protobuf::internal::win32::{anonymous}::null_or_empty(const char_type)': C:\opencv\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc:94:15: error: 'nullptr' was not declared in this scope return s == nullptr || s == 0; ^ mingw32-make.exe[2]: [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/io_win32.cc.obj] Error 1 mingw32-make.exe[1]: [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] Error 2 mingw32-make.exe: ** [all] Error 2 3rdparty\protobuf\CMakeFiles\libprotobuf.dir\build.make:258: recipe for target '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/io_win32.cc.obj' failed mingw32-make.exe[2]: Leaving directory 'C:/opencv/build' CMakeFiles\Makefile2:710: recipe for target '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all' failed mingw32-make.exe[1]: Leaving directory 'C:/opencv/build' C:/opencv/build/Makefile:161: recipe for target 'all' failed Process terminated with status 2 (4 minute(s), 24 second(s)) 4 error(s), 4 warning(s) (4 minute(s), 24 second(s))

Can you somebody help me please ?