2016-06-23 3 views
1

私はubuntuでprotobufでコンパイルできませんでした。ここでエラーがある:Protobuf on Ubuntuがコンパイルされていません

error: #error This file was generated by a newer version of protoc which is #error This file was generated by a newer version of protoc which is ^ build/x86_64/gen/rtbkit/plugins/exchange/realtime-bidding.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update ^ build/x86_64/gen/rtbkit/plugins/exchange/realtime-bidding.pb.h:14:2: error: #error your headers. #error your headers. ^ In file included from build/x86_64/gen/rtbkit/plugins/exchange/realtime- bidding.pb.cc:5:0: build/x86_64/gen/rtbkit/plugins/exchange/realtime-bidding.pb.h:26:55: fatal error: google/protobuf/generated_enum_reflection.h: No such file or directory #include ^

私はそれを削除し、それはまだこれがいるProtobufに共通の問題であるいるProtobuf 2.5

答えて

1

を示しています。あなたが使用しているヘッダと使用しているヘッダを慎重に確認する必要があります.2つのバージョンがインストールされている場合は特にそうです!これは、あなたが使用する必要がありprotocバージョンであると考えられる場合

#if GOOGLE_PROTOBUF_VERSION < 2006000 

チェック:ヘッダファイル.pb.hで は、あなたが使用されいるProtobufのバージョンがあります。 その後、使用しているprotobufヘッダーは何ですか。 Protocのバージョンとprotobufヘッダーの間に相関がない場合は、メッセージが表示されます。

+0

私はヘッダーを確認しました。#if GOOGLE_PROTOBUF_VERSION <2005000新しいバージョン2.6.1をインストールしました。今回は:kEmptyStringはgoogle :: protobuf :: Internal @Gibeのメンバーではありません –

+0

2.5バージョンが動作しています。ありがとう! –

関連する問題