happynear / caffe-windows

Configure Caffe in one hour for Windows users.
Other
1.32k stars 650 forks source link

编译libcaffe报错 C2694 #288

Open xisi789 opened 5 years ago

xisi789 commented 5 years ago

严重性 代码 说明 项目 文件 行 禁止显示状态 错误 C2694 “bool boost::system::error_category::std_category::equivalent(const std::error_code &,int) const”: 重写虚函数的限制性异常规范比基类虚成员函数“bool std::error_category::equivalent(const std::error_code &,int) noexcept const”少 libcaffe E:\0-project\1-facerecognition\1-code\AMSoftmax-master\AMSoftmax-master\Caffe-AM-Softmax\caffe-windows-ms\windows\thirdparty\Boost\boost\system\error_code.hpp 247

这个是个什么问题呢?该如何解决呢?

lulurelax commented 5 years ago

the current ms branch is using boost 1_65, it might use some new features which are considered compile error by visual studio's compiler, you can check the error by searching c2694. To avoid the error, try to use other version of boost(1_61).

xisi789 commented 5 years ago

The problem has been solved. Thank you!

ouyangshaoxia commented 5 years ago

如何解决的

piaobuliao commented 5 years ago

@ouyangshaoxia 参考lewisgit的 下载boost_1_61_0的 把boost_1_61_0的路径设置到 CommonSettings.props的

D:\Softwares\boost_1_61_0\
<BoostLibraryFolder>D:\Softwares\boost_1_61_0\lib64-msvc-14.0\</BoostLibraryFolder>
komgcn commented 5 years ago

@lewisgit why will this compile error occur? is it because of the version of visual studio I used? (which is vs 14.0 2015)

ouyangshaoxia commented 5 years ago

Not so, you should change the version of boost to 1.6.1, origial program boost version is 1.6.5, If you need more help, I can give you a link to download the right boost_1_6_1. wish help you.

At 2018-08-21 20:08:01, "Gary Cheong" notifications@github.com wrote:

@lewisgit why will this compile error occur? is it because of the version of visual studio I used? (which is vs 14.0 2015)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

komgcn commented 5 years ago

@ouyangshaoxia 谢谢你的帮助, 我已经下载1.6.1并且生成成功了, 但是我就是想知道为什么只有我和搂住出现这种情况, 既然我们都是用VS2015和CUDA8.0, 为什么我们不能用boost1.65, 原因是什么呢?

lulurelax commented 5 years ago

@komgcn vs2015 doesn't support a certain c++ feature, but boost 1_65 used that feature. try to update your compiler(eg.vs2017), error should be solved

justein commented 5 years ago

@lewisgit I change the boost to 1.61 ,and use py3 compile the lib, this error disappeared,but it raised another error ,which is "python27.lib" cannot open such a file . BUT,I use the py3 ,why it find python27.lib?

justein commented 5 years ago

@komgcn Plz tell me how would you make it works?