我目前得到指向我在由protoc產生的頭文件,這些行錯誤:協議緩衝區錯誤
#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
但我protoc版本匹配上面的一個:
protoc --version
libprotoc 2.6.1
我在做什麼錯?
最初我的protoc版本是3.0.0,然後通過同步回到2.6.1並執行步驟重新安裝它; make distclean,./configure,make,make install來安裝所需的2.6.1版本。我需要較舊的版本,因爲那是安裝在我們的服務器上的版本。
您確定您之前(含3.0.0版本)生成的protobuf標頭已被移除/更新嗎? –
是的,我明確刪除了這些3.0.0頭。我也檢查過該文件,並且該版本的檢查驗證與上面編寫的2006001版本比較 –