在搭建caffe的过程中,有可能会出现下面三个错误:

error LNK2001: 无法解析的外部符号 “__int64 google::protobuf::internal::empty_string_once_init_” (?empty_string_once_init_@internal@protobuf@google@@3_JA) D:\VS_PROJECT\caffe\caffe\caffe.pb.obj


error LNK2001: 无法解析的外部符号 “class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const * const google::protobuf::internal::empty_string_” (?empty_string_@internal@protobuf@google@@3PEBV?

basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@EB) D:\VS_PROJECT\caffe\caffe\data_reader.obj

error LNK2001: 无法解析的外部符号 “private: static int google::protobuf::io::CodedInputStream::default_recursion_limit_” (?default_recursion_limit_@CodedInputStream@io@protobuf@google@@0HA) D:\VS_PROJECT\caffe\caffe\io.obj


问题的原因是你采用的google的protobuf的版本是最新的版本与caffe不兼容,应当将protobuf的版本换成以前的,

可换为protobuf-2.5.0.tar.gz,下载地址为:http://pan.baidu.com/s/1pJlZubT,用旧版本的protobuf来配置caffe即可解决问题。


版权声明:本文为Quincuntial原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/Quincuntial/article/details/50593268