This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: can't find <bool.h>


Hi Brendan,


Brendan Simon wrote:
> I've added some more variables recently which use the bool type but
> gcc/g++ can't find <bool.h>

"bool" is a built-in type for C++. Older C++ compilers didn't have it,
so some STL implementations used a header with an enum or defines.

You can 

- remove the line #include<bool.h>
- use #ifndef __GNUC__ #include<bool.h> #endif
- create an empty header bool.h

> I also have the my own types.h file with the following.
> 
> typedef bool BOOL;
> 
> MinGW32 doesn't seem to like this because the Windows API uses BOOL.

That's right. The Windows headers are basically in C and they define and
use the typedef "BOOL".

> I
> have tried using BOOLEAN but the Windows API seems to use it as well.

Don't know about that one. Just use the built-in "bool" and you should
be o.k.


so long, benny
======================================
Benjamin Riefenstahl (benny@crocodial.de)
Crocodial Communications EntwicklungsGmbH
Ruhrstraße 61, D-22761 Hamburg, Germany
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]