Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   -D_BOOL in GCC (http://www.programmingforums.org/showthread.php?t=12633)

rwm Feb 21st, 2007 2:52 AM

-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!

Eoin Feb 21st, 2007 6:24 AM

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.

rwm Feb 21st, 2007 10:21 AM

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!

Eoin Feb 21st, 2007 12:48 PM

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"

rwm Feb 22nd, 2007 1:41 AM

Mmm, ok I wont forget that!

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

Thx again!


All times are GMT -5. The time now is 3:05 PM.

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