在编译自己的caffe相关的程序的过程中,突然出现了如下错误(之前是正常的编译通过的):
/usr/local/caffe/include/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
^
/usr/local/caffe/include/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^
/usr/local/caffe/include/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.
此时按照错误信息的路径找到该文件并打开,看到如下内容:
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: caffe.proto
#ifndef PROTOBUF_caffe_2eproto__INCLUDED
#define PROTOBUF_caffe_2eproto__INCLUDED
#include <string>
#include <google/