D:\Opencv_Tools\opencv\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc|94|error: 'nullptr' was not declared in this scope|

asked 2018-03-04 11:02:56 -0500

rezaee gravatar image

updated 2018-03-04 11:04:34 -0500

berak gravatar image

I am trying to build opencv-3.4.1-vc14_vc15 in my windows 10 using cmake-3.10.2-win64-x64. First of all I tried using CMake to configure and generate the new_build files(using codeblocks minGW makefile). I only checked the BUILD_opencv_world option as I saw in a tutorial. I think it did it without errors. Then I opened the OpenCV.cbp file within my codeblocks 17.02 and build it.

but I got this error:

||=== Build: all in OpenCV (compiler: GNU GCC Compiler) ===|
D:\Opencv_Tools\opencv\sources\3rdparty\libjpeg\jcmaster.c||In function 'validate_script':|
D:\Opencv_Tools\opencv\sources\3rdparty\libjpeg\jcmaster.c|456|warning: array subscript is above array bounds [-Warray-bounds]|
D:\Opencv_Tools\opencv\sources\3rdparty\libjpeg\jquant1.c||In function 'start_pass_1_quant':|
D:\Opencv_Tools\opencv\sources\3rdparty\libjpeg\jquant1.c|443|warning: array subscript is above array bounds [-Warray-bounds]|
D:\Opencv_Tools\opencv\sources\3rdparty\libwebp\src\enc\quant_enc.c||In function 'VP8SetSegmentParams':|
D:\Opencv_Tools\opencv\sources\3rdparty\libwebp\src\enc\quant_enc.c|376|warning: array subscript is above array bounds [-Warray-bounds]|
D:\Opencv_Tools\opencv\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc|94|warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]|
D:\Opencv_Tools\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*)':|
D:\Opencv_Tools\opencv\sources\3rdparty\protobuf\src\google\protobuf\stubs\io_win32.cc|94|error: 'nullptr' was not declared in this scope|
3rdparty\protobuf\CMakeFiles\libprotobuf.dir\build.make|412|recipe for target '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/io_win32.cc.obj' failed|
CMakeFiles\Makefile2|694|recipe for target '3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all' failed|
D:\Opencv_Tools\opencv\new_build\Makefile|161|recipe for target 'all' failed|
||=== Build failed: 4 error(s), 4 warning(s) (4 minute(s), 45 second(s)) ===|
edit retag flag offensive close merge delete