Thread overview
Problems with header files when using -Ab
Jun 12, 2001
Damian Dixon
Jun 12, 2001
Jan Knepper
Jun 12, 2001
Walter
June 12, 2001
Hi,

Had a couple of problems when using the -Ab flag as follows:

sc test.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -Ab -Id:\sc\stltemp\STL\port\stlport -otest.obj
Error: D:\SC\BIN\..\include\win32\objidl.h(8213): illegal combination of types
Error: D:\SC\BIN\..\include\win32\oaidl.h(358): illegal combination of types
Lines Processed: 133764  Errors: 3  Warnings: 0
Build failed

I had to modify the headers. Looks like M$ has a pragma to disable bool for this:

// Disable the warning about the obsolete member named 'bool'
// 'bool', 'true', 'false', 'mutable', 'explicit', & 'typename'
// are reserved keywords
#pragma warning(disable:4237)


Is there anyway of extending the compiler to support this if possible.

Regards
Damian

June 12, 2001
Hi Damian,

I run into that same problem quite a while ago and recently changed it to support DMC++ I just changed the headerfile:


        /* [case()] */ VARIANT_BOOL boolVal;
#if defined(__SC__) || defined(__DMC__)
#   if defined(_BOOL_DEFINED)
        /* [case()] */ _VARIANT_BOOL _bool;
#   else
        /* [case()] */ _VARIANT_BOOL bool;
#   endif
#else
        /* [case()] */ _VARIANT_BOOL bool;
#endif
        /* [case()] */ long lVal;

HTH

Jan



Damian Dixon wrote:

> Hi,
>
> Had a couple of problems when using the -Ab flag as follows:
>
> sc test.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -Ab -Id:\sc\stltemp\STL\port\stlport -otest.obj
> Error: D:\SC\BIN\..\include\win32\objidl.h(8213): illegal combination of types
> Error: D:\SC\BIN\..\include\win32\oaidl.h(358): illegal combination of types
> Lines Processed: 133764  Errors: 3  Warnings: 0
> Build failed
>
> I had to modify the headers. Looks like M$ has a pragma to disable bool for this:
>
> // Disable the warning about the obsolete member named 'bool'
> // 'bool', 'true', 'false', 'mutable', 'explicit', & 'typename'
> // are reserved keywords
> #pragma warning(disable:4237)
>
> Is there anyway of extending the compiler to support this if possible.
>
> Regards
> Damian

June 12, 2001
Yes, that's always been a very irritating problem with the windows header files. I just comment out those lines in it. -Walter

Damian Dixon wrote in message <1104_992333349@dilbert>...
>Hi,
>
>Had a couple of problems when using the -Ab flag as follows:
>
>sc
test.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -Ab -Id:\sc\stltemp\STL\po rt\stlport -otest.obj
>Error: D:\SC\BIN\..\include\win32\objidl.h(8213): illegal combination of
types
>Error: D:\SC\BIN\..\include\win32\oaidl.h(358): illegal combination of
types
>Lines Processed: 133764  Errors: 3  Warnings: 0
>Build failed
>
>I had to modify the headers. Looks like M$ has a pragma to disable bool for
this:
>
>// Disable the warning about the obsolete member named 'bool'
>// 'bool', 'true', 'false', 'mutable', 'explicit', & 'typename'
>// are reserved keywords
>#pragma warning(disable:4237)
>
>
>Is there anyway of extending the compiler to support this if possible.
>
>Regards
>Damian
>