如何解决clang(或gcc)中的C ++名称? [英] How to demangle a C++ name in clang (or gcc)?

查看:94
本文介绍了如何解决clang(或gcc)中的C ++名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写一个快速和脏的诽谤的诽谤。我找到了一个一段代码,它使用 abi :: __ cxa_demangle ,但我不知道它需要哪个头。显而易见的选择是 ABI.h ,但是:

I'm trying to write a quick-and-dirty demangler for clang. I've found a piece of code that uses abi::__cxa_demangle, but I can't figure out which header it requires. The obvious choice is ABI.h but:

demangle.cpp:2:10: fatal error: 'ABI.h' file not found
#include <ABI.h>
         ^

我需要使用 abi :: __ cxa_demangle c> c>

What do I need to use abi::__cxa_demangle?

推荐答案

包含 cxxabi.h 。在Ubuntu 13这个头在 / usr / include / c ++ / 4.x 其中 x 是小gcc版本。

Include cxxabi.h. In Ubuntu 13 this header is in /usr/include/c++/4.x where x is minor gcc version.

这篇关于如何解决clang(或gcc)中的C ++名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆