Windows+SSD

参考文章:http://www.jianshu.com/p/9a84cc434e05

错误1:regex

编译项目,报与boost相关的regex正则表达式库出现问题,在项目中我们不需要正则表达式,所以将相关语句注释掉即可。进入项目libcaffe中,进入detection_output_layer.cu文件,将所有出现regex和rv的语句注释掉。进入detection_output_layer.cpp文件,将所有出现regex和rv的语句注释掉。进入detection_output_layer.hpp中,将语句#include <boost/regex.hpp>注释掉。


错误2.fatal error C1189: #error :  ERROR macro is defined.


解决方法1):


在工程加上预编译宏GLOG_NO_ABBREVIATED_SEVERITIES
C/C++   -->  预处理器   -->   预处理器定义   -->  加上GLOG_NO_ABBREVIATED_SEVERITIES宏   保存,编译通过~


解决方法2):试验成功


Solution https://hpc.nih.gov/development/glog.html
file: \include\caffe\util\bbox_util.hpp + \include\caffe\common.hpp
add


#define GLOG_NO_ABBREVIATED_SEVERITIES 
before


#include <glog/logging.h>


错误3:expected an identifier in caffe.pb.h 


解决:修改bbox_util.cu,注释掉所有带thrust的语句


修改detection_output_layer.cu和detection_output_layer.cpp文件,注释掉所有regex和rv的语句
 //boost::regex exp("\"(null|true|false|-?[0-9]+(\\.[0-9]+)?)\"");


//std::string rv = boost::regex_replace(ss.str(), exp, "$1");  
//outfile << rv.substr(rv.find("["), rv.rfind("]") - rv.find("["))  
//    << std::endl << "]" << std::endl; 


修改detection_output_layer.hpp,注释#include“boost/regex.hpp”
//#include <boost/regex.hpp>  


错误4: error C1083: 无法打开源文件: “..\..\src\caffe\3rdparty\hungarian.cpp”: No such file or directory E:\caffe-ssd-microsoft\windows\libcaffe\c1xx libcaffe


解决:在路径.\caffe-master\include\caffe\3rdparty\下添加hungarian.h文件。编译项目,报错:找不到".\src\caffe\3rdparty\hungarian.cpp"文件,在路径.\caffe-master\src\caffe\3rdparty\下添加hungarian.cpp文件


在这里找这个文件,链接:http://pan.baidu.com/s/1mhYuf7y 密码:3jp2


错误5:编译项目,报与thrust相关的错误,进入项目libcaffe中,注释掉


#include "thrust/functional.h"
#include "thrust/sort.h"
……
thrust::sort_by_key(&confidences[0], &confidences[0] + num_remain, &idx[0],
thrust::greater<Dtype>());
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值