[GCC-XML] Relative paths in GCCXML

Brad King brad.king at kitware.com
Tue Sep 25 18:50:10 EDT 2007


Chris Friedemann wrote:
> Yeah, I'm positive that the relative path exists from the files 
> location.  To make 100% sure, I whipped up a little test.  If you create 
> a file like this:
>  
> C:\xmlTest\testA.h:
>  
> #define SOME_CONSTANT = 1;

FYI, this isn't C preprocessor syntax.  It should be just

#define SOME_CONSTANT 1

> And then create another file like this:
>  
> C:\xmlTest\tempDir\testB.h:
>  
> //#include "../testA.h"
> //#include "c:\xmlTest\testA.h"
>  
> #define OTHER_CONSTANT = SOME_CONSTANT;

#define OTHER_CONSTANT SOME_CONSTANT

> Save both of them, and create a folder inside of another folder.  Place 
> testA.h in the first folder, and testB.h in the second folder.  If you 
> uncomment the first #include, you get a "cannot find file" error.  If 
> you uncomment the second include (and you fix it for the actual paths of 
> the folder you created) then it will work.

Does this example work with your compiler, independent of gccxml?

I just tried your example and it works fine with CVS gccxml on both 
windows and linux.

What is the command line of gccxml you're running?  What is the output 
of the command line with the --print flag added?  How about with the 
--debug flag added?

-Brad



More information about the gccxml mailing list