解决办法
1.修改#include部分
1 2 3 4
| #ifdef __GNUC__ #include <cxxabi.h> #endif
|
2.修改demangle函数,当编译器为MSVC时直接将输入参数返回
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| static inline std::string demangle(const std::string &name) { #ifdef _MSC_VER return name; #elif defined(__GNUC__) int status=0; char *p=abi::__cxa_demangle(name.c_str(), 0, 0, &status); std::string ret(p); free(p); return ret; #else
#error unexpected c complier (msc/gcc), Need to implement this method for demangle #endif }
|