www.digitalmars.com         C & C++   DMDScript  

c++ - Problems with header files when using -Ab

reply Damian Dixon <damian.dixon tenetdefence.com> writes:
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
Jun 12 2001
next sibling parent Jan Knepper <jan smartsoft.cc> writes:
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

Jun 12 2001
prev sibling parent "Walter" <walter digitalmars.com> writes:
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

rt\stlport -otest.obj
Error: D:\SC\BIN\..\include\win32\objidl.h(8213): illegal combination of

Error: D:\SC\BIN\..\include\win32\oaidl.h(358): illegal combination of

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

// 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

Jun 12 2001