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: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.

很奇怪的一个问题,我电脑是之前可以编译这个caffe是没有问题的,但是拿同事那边的caffe过来一编译就出这个问题!
很纳闷,protobuf的问题。我电脑看了就一个protobuf啊,3.0.0的

然后弄了一会儿,还是根据这个报错提示来。然后发现:
/caffe/src/caffe/proto/caffe.pb.cc
/caffe/src/caffe/proto/caffe.pb.h
/caffe/src/caffe/proto/caffe.proto

这个src/caffe/proto文件夹下应该就一个文件,caffe.proto。其他两个文件是编译的时候生成的,但是make clean
这个命名并不能把它删掉! 需要手动删除!这样才会重新编译生成,要不然就是用既有的。
所以这个报错提示还是很精确的,奈何为啥一开始没有仔细看看呢?

posted @ 2022-05-24 14:09  无左无右  阅读(461)  评论(0编辑  收藏  举报