2016-06-23 4 views
1

우분투에서 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

보여줍니다. 사용하고있는 헤더가 무엇인지 신중하게 확인해야합니다. 두 버전이 설치되어있는 경우 특히 그렇습니다. 이것은 당신이 사용한다 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 버전이 작동하지만, 감사! –