[GCC-XML] GCCXML_FLAGS and misc problems

Brad King brad.king at kitware.com
Wed Sep 8 18:17:08 EDT 2004


k a wrote:
> I am having problems when running GCCXML by forking a process and executing it under Linux. When I run GCCXML directly on the command line, it runs fine. However, when I exec in a C program, I keep getting the following errors:
> ===
> <path>/GCCXML/share/gccxml-0.6/gccxml_find_flags: line 42: cat: command not found
> <path>/GCCXML/share/gccxml-0.6/gccxml_find_flags: line 55: gcc: command not found
> <path>/GCCXML/share/gccxml-0.6/gccxml_find_flags: line 58: rm: command not found
> Error executing "/home/kelvinau/project/xi32/jut_install/support/GCCXML/share/gccxml-0.6/gccxml_find_flags gcc "
> Could not determine GCCXML_FLAGS setting.
> ===

When you run it from a C program are you changing the PATH environment 
variable?  On UNIX platforms GCC-XML needs to run a shell script 
internally to help simulate your compiler's preprocessor.  This shell 
script assumes things like "cat" are in the path.

> Another problem is also relating to running GCCXML in a C program (I'm unsure whether it's related to the problem above). Using execvp, the arguments I pass to GCCXML are in the form of an array of char*. However, when it executes, it seems not to be taking -D or -I options, since a lot of errors are shown as a result (typical compile errors). Again, if I repeat this but running GCCXML directly, it works.

Are you passing the arguments and values together or separately?

  "-DFOO" v. "-D","FOO"

The "gccxml" executable looks for a few special arguments (listed by 
--help) and then passes everything else on to the internal gcc parser 
executable.  Add the argument "--debug" to get gccxml to print out the 
full set of arguments it is passing to the internal executable.

-Brad




More information about the gccxml mailing list