Protocol Buffer Error on compile during GOOGLE_PROTOBUF_MIN_PROTOC_VERSION check

前端 未结 1 639
长情又很酷
长情又很酷 2021-01-01 19:01

I\'m currently getting an error which points me to these lines in the header file produced by protoc:

#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#er         


        
相关标签:
1条回答
  • 2021-01-01 19:14

    The problem is that the installed headers on your system (in /usr/include/google/protobuf or /usr/local/include/google/protobuf) are from a newer version of Protocol Buffers than your protoc. It may be the case that you have both versions installed in different locations, and the wrong one is being used.

    But my protoc version matches the one above:

    Yes, because that code was generated by your protoc, and it knows its own version. The code is asking: "Is my version (2006001) less than the minimum version which the installed headers claim is required (GOOGLE_PROTOBUF_MIN_PROTOC_VERSION)?"

    0 讨论(0)
提交回复
热议问题