使用 python 编译引脚工具的错误包括,得到错误 C2872:'UINT32':不明确的符号
Errors compiling pin tool with python includes, getting error C2872: 'UINT32' : ambiguous symbol
我正试图用Python.h
编译pin工具,但收到了100多个关于不明确符号的错误。
我试图将include
分离到不同的命名空间,但它产生了许多其他错误。
包括windows.h
时也会发生同样的情况。
所有的错误看起来像:
D:projPinsourceincludepingentypes_core.TLH(67): error C2872: 'INT32' : ambiguous symbol could be 'C:Program Files (x86)Windows Kits8.0Includesharedbasetsd.h(72) : int INT32 or D:projpinPinsourceincludepingentypes_foundation.TLH(88) : LEVEL_BASE::INT32' D:projpinPinsourceincludepingentypes_core.TLH(81) :
see reference to class template instantiation 'LEVEL_CORE::INDEX<dummy>' being compiled
你知道这个问题的快速解决方案吗?
谢谢!
如果你想使用Windows.h标头,你必须在它自己的命名空间中使用它:
namespace WINDOWS
{
#include <Windows.h>
}
然后使用Windows.h中的名称空间:
WINDOWS::DWORD foo; // use WINDOWS namespace
如果你不为windows.h标头使用名称空间,你将从PIN本身获得大量与各种标头的名称冲突。
编辑:
我只记得在手册的某个地方提到了这一点(请参阅:"Pin和Windows之间的冲突"(:
https://software.intel.com/sites/landingpage/pintool/docs/65163/Pin/html/index.html#RESTRICTIONS
- 在C++中使用内联方法时出现未定义的符号错误
- 我收到错误LNK2001:未解析的外部符号(C++代码)
- 错误:隐式转换更改符号:'int'到'unsigned long'
- 错误:当我从"WinDbg"打开可执行文件时,找不到符号文件。默认导出 ntdll 的符号.dll
- 可视抽象类 c++(错误 LNK 2001:未解析的外部符号)
- clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) - 体系结构的未定义符号 x86_64:
- 添加符号 libgtest.so 错误:命令行中缺少 DSO
- 如何摆脱C++中未解析的外部符号"private: static char"错误?
- 当 lib 已添加到其他依赖项时,如何在 VS 中调试未解析的外部符号错误
- 体系结构x86_64的未定义符号:链接器错误
- 错误LNK2019未解析的外部符号"public: __thiscall SLinkList<char>::SLinkList<char>(void)"
- 引入参数化构造函数后显示 LNK 2019 未解析外部符号的代码错误
- 与Qt交叉编译到Raspberry Pi 3B+通讯录(协议缓冲区)-错误符号查找错误
- 链接错误:符号重复
- 架构X86_64静态类成员的错误符号X86_64错误
- 缓冲区中使用 GetWindowText 的错误符号
- OSX:ld:警告:错误符号操作:适用于核心库
- 为什么 Folly 的共享库引用了 Boost 中的错误符号?(OS X 上的 GCC)
- 嵌入lua运行时错误:符号未找到:_luaL_newstate
- C++ 找不到"::"架构的苹果马赫-O链接器错误/符号