当我尝试编译FIRE图像处理项目时,在MacOS上出现错误。我在这里https://github.com/deselaers/fire-cbir/issues/3开了一个问题,但是维护者不再从事该项目。我打算将其用于学校项目,但无法编译。主要问题似乎是以下错误。
In file included from Retriever/fire.cpp:42:
In file included from Retriever/server.hpp:23:
In file included from Retriever/distancemaker.hpp:28:
In file included from DistanceFunctions/dist_jsd.hpp:24:
Features/sparsehistogramfeature.hpp:60:12: error: no matching function for call to object of type
'const __gnu_cxx::hash<char *>'
return h(p.c_str());
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ext/__hash:38:12: note:
candidate function not viable: 1st argument ('const std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >::value_type *' (aka 'const char *')) would lose const qualifier
size_t operator()(char *__c) const _NOEXCEPT
^
维护者建议可以通过一些编译器调整来完成。我不确定如何解决该问题,主要是因为我不是C ++专家,而且我不确定该问题到底是什么。有人可以帮我调试吗?谢谢!