Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 21st, 2007, 2:52 AM   #1
rwm
Professional Programmer
 
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2 rwm is on a distinguished road
-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!
rwm is offline   Reply With Quote
Old Feb 21st, 2007, 6:24 AM   #2
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
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.
Eoin is offline   Reply With Quote
Old Feb 21st, 2007, 10:21 AM   #3
rwm
Professional Programmer
 
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2 rwm is on a distinguished road
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!
rwm is offline   Reply With Quote
Old Feb 21st, 2007, 12:48 PM   #4
Eoin
Hobbyist Programmer
 
Eoin's Avatar
 
Join Date: Jun 2006
Location: Ireland
Posts: 152
Rep Power: 3 Eoin is on a distinguished road
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.
Eoin is offline   Reply With Quote
Old Feb 22nd, 2007, 1:41 AM   #5
rwm
Professional Programmer
 
Join Date: Jan 2007
Location: Cape Town
Posts: 291
Rep Power: 2 rwm is on a distinguished road
Mmm, ok I wont forget that!

Just found the -D flag in the GCC docs, well its all cool here!

Thx again!
rwm is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:35 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC