src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc...

created at 05-29-2022 views: 0

error message

src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is


/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^~~~~
/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^~~~~
/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.

A very strange question. My computer was able to compile this caffe without any problem before, but this problem occurred when I used the caffe from my colleague. Very puzzled, the problem of protobuf. My computer only has one protobuf, the version is 3.0.0.

solution

Then after a while, I still follow this error message. Then found:

/caffe/src/caffe/proto/caffe.pb.cc
/caffe/src/caffe/proto/caffe.pb.h
/caffe/src/caffe/proto/caffe.proto

There should be one file in the src/caffe/proto folder: caffe.proto. The other two files are generated at compile time, but make clean command does not delete it! Need to delete manually! This will recompile and generate, or use the existing one.

created at:05-29-2022
edited at: 05-29-2022: