如何开启STL向后兼容?

发布于 2024-09-29 02:12:22 字数 398 浏览 3 评论 0原文

我正在尝试编译使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

池木 2024-10-06 02:12:23

当您编译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 in ext/hash_fun.h.

In m4/stl_hash_fun.m4, you can see the list of places that it searches.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文