1

I've got an error. The error is occurred in cmd directory where openCV is when I use the command mingw32-make. My OS is win 7 64 bit. I followed this user guide: http://www.ti.com/lit/ug/dlpu042/dlpu042.pdf

Any help is appreciated!Here is the error in cmd:

    C:\OpenCV>mingw32-make
[  0%] Built target gen-pkgconfig
[  2%] Built target zlib
[  5%] Built target libjpeg-turbo
[  8%] Built target libtiff
[ 16%] Built target libwebp
[ 19%] Built target libjasper
[ 20%] Built target libpng
[ 25%] Built target IlmImf
[ 25%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/goog
le/protobuf/stubs/io_win32.cc.obj
C:\Users\xxx\Downloads\opencv\sources\3rdparty\protobuf\src\google\protobuf
    \stubs\io_win32.cc:94:3: warning: identifier 'nullptr' is a keyword in C++11 [-W
    c++0x-compat]
       return s == nullptr || *s == 0;
       ^

    C:\Users\xxx\Downloads\opencv\sources\3rdparty\protobuf\src\google\protobuf
    \stubs\io_win32.cc: In function 'bool google::protobuf::internal::win32::{anonym
    ous}::null_or_empty(const char_type*)':
    C:\Users\xxx\Downloads\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;
                   ^
    C:\Users\xxx\Downloads\opencv\sources\3rdparty\protobuf\src\google\protobuf
    \stubs\io_win32.cc: In function 'bool google::protobuf::internal::win32::{anonym
    ous}::null_or_empty(const char_type*) [with char_type = char]':
    C:\Users\xxx\Downloads\opencv\sources\3rdparty\protobuf\src\google\protobuf
    \stubs\io_win32.cc:95:1: error: control reaches end of non-void function [-Werro
    r=return-type]
     }
     ^
    C:\Users\xxx\Downloads\opencv\sources\3rdparty\protobuf\src\google\protobuf
    \stubs\io_win32.cc: In function 'bool google::protobuf::internal::win32::{anonym
    ous}::null_or_empty(const char_type*) [with char_type = wchar_t]':
    C:\Users\xxx\Downloads\opencv\sources\3rdparty\protobuf\src\google\protobuf
    \stubs\io_win32.cc:95:1: error: control reaches end of non-void function [-Werro
    r=return-type]
     }
     ^
    cc1plus.exe: some warnings being treated as errors
    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[2]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/pr
    otobuf/stubs/io_win32.cc.obj] Error 1
    CMakeFiles\Makefile2:715: recipe for target '3rdparty/protobuf/CMakeFiles/libpro
    tobuf.dir/all' failed
    mingw32-make[1]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] Error 2
    Makefile:161: recipe for target 'all' failed
    mingw32-make: *** [all] Error 2
Sakolou
  • 11
  • 3
  • I've found a same problem [here](https://stackoverflow.com/questions/49459395/install-opencv-3-4-1-and-qt-5-10-with-cmake#new-answer). Ant tips? – Sakolou Aug 08 '18 at 09:29
  • Did you install exactly the tool versions as in the *.pdf* or updated ones? I built it using tools existing on my machine (cmdline *cmake*) and it went OK. What is *MinGW*'s *gcc* version? – CristiFati Aug 08 '18 at 19:19
  • Check my answer to the other question. – CristiFati Aug 09 '18 at 12:26
  • Hi, Thanks fo the comment. The problem is solved, when I installed a fresh windows. I think I'd accidentally removed some default windows paths while adding the path of Qt in the environment variables. – Sakolou Aug 17 '18 at 13:34

0 Answers0