-
GCC bool undefined
Currently,
I'm using Redhat 9.0 with Kernel 2.4.20-31.9. Including GLIB 2.4, GLIBC 2.2 and GCC 3.2.2 20040222 (Red Hat Linux 3.2.2-5).
Whenever I compile a file with gcc, the identifier bool seems to be undeclared. I have temporarily fixed this by adding typedef enum {FALSE, TRUE} bool; to my main source file, but I would like to know if there is a patch for GCC that might fix this in the future. Or if one or more of my previous versions of GCC, GLIB, are GLIBC or out-dated and may have something to do with this problem, please let me know.
Thank you for your time,
- Stack Overflow
-
bool is a c++ type; use g++ or stick with your enum typedef if you want to use it with gcc.
-
Okay,
Thanks for the tip. I'll keep this in mind.
Thank you for your time,
- Stack Overflow
-
you might think it is because vi automatically highlights it even in .c code.