GCC Macros

Amilcar do Carmo Lucas webmaster at kdevelop.org
Sun Jun 24 21:57:54 UTC 2007


----------  Forwarded Message  ----------
From: Roberto Raggi <roberto at kdevelop.org>

Hi,

A very little useful hack. For instance, you can use it in KDevelop  
to configure the C++ engine for GCC. I don't know if you can do the  
same with other compilers.


Ask GCC for the built-in macros

[roberto at MacBook parser]$ gcc -xc++ -E -dM - < /dev/null
#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
...



Ask GCC for the standard include paths

[roberto at MacBook parser]$ gcc -xc++ -E -v - < /dev/null
...
#include <...> search starts here:
/usr/include/c++/4.0.0
/usr/include/c++/4.0.0/i686-apple-darwin8
/usr/include/c++/4.0.0/backward
/usr/lib/gcc/i686-apple-darwin8/4.0.1/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
End of search list.


ciao robe

-------------------------------------------------------

-- 
Amilcar Lucas
Webmaster
The KDevelop project




More information about the KDevelop-devel mailing list