![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
-D_BOOL in GCC
hey,
im trying to find docs explaining the use of -D_BOOL flag in GCC compiler... ive downloaded the GCC docs but search for it returns nothing... g++ -DREQUIRE_IOSTREAM -D_BOOL -DLINUX ... none of those flags are in the docs??? any ideas??? thx! |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3
![]() |
Hi rwm, the -DNAME flags #define the preprocessor symbol NAME, for the files gcc is about to compile. So the given command line #defines the symbols _BOOL, REQUIRE_IOSTREAM and LINUX. What effects they have depends on the code being compiled.
__________________
Visit my website BinaryNotions. |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
hey thx for the reply Eoin!
that makes a lot more sense now, so its basically a #define statment, so if i just included #define BOOL i would be able to omit the -DBOOL flag, similary for the other -D flags? ta for help! |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3
![]() |
Exactly, but don't forget the underscore in front of the "BOOL", as that gets included too i.e -D_BOOL is effectively "#define _BOOL"
__________________
Visit my website BinaryNotions. |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2
![]() |
Mmm, ok I wont forget that!
Just found the -D flag in the GCC docs, well its all cool here! Thx again! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|