I'm trying to write a little build script - and want to determine if the includes are system includes or not. So I want g++ to tell me the include path's it's using.
cpp -v seems the obvious best shot, but it doesn't give me the C++ paths.
So I tried:
g++ -Xpreprocessor -v
Which doesn't work quite right - g++ captures the -v for it's own verbose output.
Thanks, Oliver
From Jonathan Wakely a better option (works on clang too):
I noticed there's a flag in cpp for specifying language. This works like a charm.
Just noticed that it is important for the
-x c++ to be -xc++
on gcc 4.2