[GCC-XML] string in gccxml

Kedar Joshi kpjoshi at gmail.com
Fri Nov 12 17:37:39 EST 2004

Thanks Brad. 

I am still getting a lot of extra structs, methods,
constructors/destructors, typedefs in the XML output file. Is there
any way to get rid of these easily or not to produce them at all and
still use the string class? (The generated output is not as big when i
only use the Fundamental types like int, float, double, etc.)

Also, why does the struct show the name as below? instead of just
something simple, like "basic_string"?

<Struct id="_2"
>" context="_5"...>

I just want to get the method signatures of all the functions in my
input file by parsing the XML output produced by gccxml.


On Fri, 12 Nov 2004 15:32:37 -0500, Brad King <brad.king at kitware.com> wrote:
> Kedar Joshi wrote:
> > I am trying to run gccxml on the following code:
> >
> > #include <string>
> > using namespace std;
> > ...
> > string echoString(string)
> > ...
> >
> > It compiles with gccxml, but not with gccxml_cc1plus.
> gccxml_cc1plus is an internal program invoked by gccxml, so it is not
> expected to work when called by hand.
> > Gccxml generates a very large file with a lot of unwanted stuff. Is
> > there another way to use a C++ string and maybe without generating the
> > extra code?
> You can use the "-fxml-start" option to specify a declaration.  The
> subgraph of references starting at this declaration is dumped:
> gccxml foo.cxx -fxml=foo.xml -fxml-start=echoString
> -Brad

More information about the gccxml mailing list