[GCC-XML] #define not in result XML

Brad King brad.king at kitware.com
Tue Oct 18 10:48:56 EDT 2005


JoeSB COE9 wrote:
> When I tried to use GCCXML to Create Binding for OpenGL it doesn't work
> GL function are exported but all #define constants are not exported.

GCC-XML dumps the source as seen by the _compiler_, not the 
_preprocessor_.  At the time it runs the preprocessor has already 
finished and all macros are expanded.  There is no way to get 
preprocessor constants with GCC-XML, at least in the XML.  You can run

   gccxml mysrc.cxx -E -dM

to get a list of preprocessor macros defined at the end of the 
translation unit, or

   gccxml mysrc.cxx -E -dD

to get the definitions inline with the preprocessed source.  These are 
features inherited from GCC.

-Brad



More information about the gccxml mailing list