Are readymade header files available for download from somewhere?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Are readymade header files available for download from somewhere?

5,389 Views
pIx
Contributor I
Hi

I wanted to use the stdbool.h header file and cannot find it and was wondering if there any any place to download the same that has been compiled for the codewarrior.

Thanks,
Sujith
Labels (1)
0 Kudos
4 Replies

614 Views
Lundin
Senior Contributor IV
stdbool.h is C99 specific. Codewarrior does not implement C99.

stdtypes.h is not standard at all.

My advice would be to write your own h-file:



#ifndef _BOOL_H
#define _BOOL_H

typedef unsigned char BOOL;

#define FALSE 0
#define TRUE 1

#endif


Or with typedef enum{FALSE, TRUE}BOOL, but that would be less efficient since enum is likely 16-bit.
0 Kudos

614 Views
imajeff
Contributor III
I looked in my CodeWarrior (8-bit), searching header files for "bool". I found it defined in STDTYPES.H
0 Kudos

614 Views
pIx
Contributor I
Thanks, I have STDTYPES.H :smileyhappy:.
0 Kudos

614 Views
imajeff
Contributor III
They should come with your C compiler (what compiler do you use?)

But here is one I use with GCC
0 Kudos