openCV mingw-32 error in cmd

孤街浪徒 提交于 2019-12-11 05:25:29

问题


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

来源:https://stackoverflow.com/questions/51629751/opencv-mingw-32-error-in-cmd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!