[转]rpcndr.h和wtypes.h冲突Bug的解决方案

http://blog.csdn.net/tzwh_86/article/details/9495133

rpcndr.h和wtypes.h冲突时,其错误表现如下:

    C:\program files\microsoft visual studio\vc98\include\rpcndr.h() : error C2632: 'char' followed by 'int' is illegal
    C:\program files\microsoft visual studio\vc98\include\rpcndr.h() : warning C4091: 'typedef ' : ignored on left of 'unsigned char' when no variable is declared
    C:\program files\microsoft visual studio\vc98\include\wtypes.h() : error C2371: 'BOOLEAN' : redefinition; different basic types  
C:\program files\microsoft visual studio\vc98\include\winnt.h(636) : see declaration of 'BOOLEAN'

其解决方法是:

在main文件的第一行加入

    #ifdef WIN32
    #include <WTypes.h> // Include this first on Win (bug #35683)
    #endif
04-19 14:04