Errors compiling pin tool with python includes, getting error C2872: 'UINT32' : ambiguous symbol

前端 未结 1 1951
有刺的猬
有刺的猬 2021-01-16 08:57

I\'m trying to compile pin tool with Python.h and am getting more then 100 errors about ambiguous symbols.

I tried to separate the include

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-16 09:50

    If you want to use the Windows.h header you must use it in its own namespace:

    namespace WINDOWS
    {
        #include 
    }
    

    And then use something from Windows.h by using its namespace:

    WINDOWS::DWORD foo; // use WINDOWS namespace
    

    If you don't use a namespace for the windows.h header you'll get tons of name collisions with various headers from PIN itself.

    edit:

    Just remembered that is was mentioned somewhere on the manual (see: "Conflicts between Pin and Windows"):

    https://software.intel.com/sites/landingpage/pintool/docs/65163/Pin/html/index.html#RESTRICTIONS

    0 讨论(0)
提交回复
热议问题