VC ++ resolves / ## / as a macro value - how to deal with it in eclipse / mingw-gcc?

I am trying to compile a real win32 application in eclipse / mingw-gcc, completely unsuccessfully so far (see https://stackoverflow.com/questions/9162976/how-to-compile-a-win32-application-in-eclipse-using -the-mingw-gcc-toolchain )

In any case, fixing another mistake, the following line in the file c: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.0A \ Include \ WTypes.h caught me curiosity:

#define _VARIANT_BOOL    /##/

It is used in struct tagVARIANTfrom C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.0A \ Include \ OAIdl.h :

VARIANT_BOOL boolVal;
_VARIANT_BOOL bool;
SCODE scode;

which expands to:

VARIANT_BOOL boolVal;

SCODE scode;

/##/ //, ! , mingw-gcc :

pasting "/" and "/" does not give a valid preprocessing token   ComHelpers      line 445, external location: o:\C\wsdk\Include\oaidl.h  C/C++ Problem

, , .

+5
1

, , undef. , , , .: (

#include <problem-header.h>

#if whatever condition makes sense
#undef _VARIANT_BOOL
#endif

.....

#ifdef _VARIANT_BOOL
_VARIANT_BOOL bool;
#endif
0

All Articles