System information (version)
- OpenCV => 4.3
- Operating System / Platform => Windows 10 64 Bit
- Compiler => Visual Studio 2017
This file was generated by an older version of protoc which is
I am trying to compile OpenCV from ~master, but having issues related with protobuf.
I tried various combination of those params but the issue remained persist:
- BUILD_PROTOBUF + WITH_PROTOBUF
- PROTOBUF_UPDATE_FILES + WITH_PROTOBUF (with this configuration, I also tried to point a manually built protobuf both 3.51 and 3.12.1)
Please note that without protobuf opencv does not compile the dnn module which I need it because I am maintaining an unofficial OpenCV binding for D programming language. The latest version that I was successfully building was 4.1. I was planning to update the repo to target version 4.3, but I stuck this issue. I see that some contrib modules such as SIFT were moved to the main repo.
I have a miniconda python installed that has also its own protoc.exe. Incase possible conflicts, I tried to rename it, but no effect.
math_functions.cpp ocl4dnn_conv_spatial.cpp ocl4dnn_inner_product.cpp ocl4dnn_lrn.cpp ocl4dnn_pool.cpp ocl4dnn_softmax.cpp onnx_graph_simplifier.cpp D:\opencv4_dev\opencv\modules\dnn\misc\onnx\opencv-onnx.pb.h(17): fatal error C1189: #error: This file was generated by an older version of protoc which is (compiling source file D:\opencv4_dev\opencv\modules\dnn\src\onnx\onnx_graph_si mplifier.cpp) [D:\opencv4_dev\Build\modules\world\opencv_world.vcxproj] onnx_importer.cpp op_halide.cpp op_inf_engine.cpp op_vkcom.cpp D:\opencv4_dev\opencv\modules\dnn\misc\onnx\opencv-onnx.pb.h(17): fatal error C1189: #error: This file was generated by an older version of protoc which is (compiling source file D:\opencv4_dev\opencv\modules\dnn\src\onnx\onnx_importer
Steps to reproduce
- using the method described here: https://docs.opencv.org/master/d3/d52/tutorial_windows_install.html (installOCV.sh on git bash)
- or cmake gui
Issue submission checklist
- I report the issue, it’s not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution
- I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc