由于“__value”符号导致的 PIN 3.0 编译错误
PIN 3.0 compilation error because of '__value' symbol
我正在使用 Visual c++ 2012 将我的工具移植到 PIN 3.0,因为我现在有 Windows10。我遵循了提供的移植指南 here
但是,我运行进入了一个错误:
error C4890: '__value': use of this keyword requires the command line option: /clr:oldSyntax
打开此 /clr:oldSyntax 选项并添加 RTTI 可用性(/GR 而不是 /GR-),否则它与 /clr:oldSyntax 不兼容,我或多或少遇到了同样的问题:
error C2059: syntax error: '__value'
此错误位于文件 type_trait.h(PIN 3.0 库的 header 文件)
#ifdef _STLP_STATIC_CONST_INIT_BUG
static const bool __value;
#else
static const bool __value = sizeof(__test<_Tp>(0)) == sizeof(__select_types::__t1);
#endif
这是一个常见问题吗?如果是,是否有任何解决方法?还是我错过了移植指南中的某些内容?我了解到此 PIN 3.0 header 中引入的名称 __value 存在冲突。
据报道,这显然是 visual c++ 中的 "bug" here
解决方案是添加以下预处理器定义:
/D__value=_value
我正在使用 Visual c++ 2012 将我的工具移植到 PIN 3.0,因为我现在有 Windows10。我遵循了提供的移植指南 here
但是,我运行进入了一个错误:
error C4890: '__value': use of this keyword requires the command line option: /clr:oldSyntax
打开此 /clr:oldSyntax 选项并添加 RTTI 可用性(/GR 而不是 /GR-),否则它与 /clr:oldSyntax 不兼容,我或多或少遇到了同样的问题:
error C2059: syntax error: '__value'
此错误位于文件 type_trait.h(PIN 3.0 库的 header 文件)
#ifdef _STLP_STATIC_CONST_INIT_BUG
static const bool __value;
#else
static const bool __value = sizeof(__test<_Tp>(0)) == sizeof(__select_types::__t1);
#endif
这是一个常见问题吗?如果是,是否有任何解决方法?还是我错过了移植指南中的某些内容?我了解到此 PIN 3.0 header 中引入的名称 __value 存在冲突。
据报道,这显然是 visual c++ 中的 "bug" here
解决方案是添加以下预处理器定义:
/D__value=_value