如何开启STL向后兼容?
我正在尝试编译使用 Google 的稀疏哈希包含文件的内容。
libs/include/google/dense_hash_map:93:60: error: ext/hash_fun.h: No such file or directory
^Cmake: *** [all] Interrupt
我知道 hash_fun.h 存在于 /usr/include/c++/4.3/backward/hash_fun.h 中。 我只是不确定如何让谷歌稀疏哈希使用它。有什么想法吗?我真的很想避免篡改 google 文件或 /usr/include 文件。我已经使用 -Wno-deprecated 来删除有关使用旧 STL 包含文件的错误,但我很确定有一种方法可以在使用较新版本的 STL 时识别 #include。
I am trying to compile something that uses Google's sparsehash include files.
libs/include/google/dense_hash_map:93:60: error: ext/hash_fun.h: No such file or directory
^Cmake: *** [all] Interrupt
I know that hash_fun.h exists in /usr/include/c++/4.3/backward/hash_fun.h.
I am just not sure how to make google sparse hash use it. Any idea? I would really like to avoid tampering with either the google files or the /usr/include files. I had already to use -Wno-deprecated for removing an error about using an old STL include file, but I am pretty sure there is a way to get #include be recognized when using newer versions of STL.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您编译sparsehash时,您是否使用与现在使用的相同的编译器来构建它?当我构建它时,它在
tr1/functioning
中找到 hash_fun,而不是在ext/hash_fun.h
中。在
m4/stl_hash_fun.m4
中,您可以看到它搜索的地点列表。When you compiled sparsehash, did you build it with the same compiler that you are using now? When I build it, it finds hash_fun in
tr1/functional
, not inext/hash_fun.h
.In
m4/stl_hash_fun.m4
, you can see the list of places that it searches.