[clug] discovering gcc "<xxx.h>" (system) include directories

Carlo Hamalainen carlo.hamalainen at gmail.com
Thu Nov 22 22:17:58 MST 2012

On Fri, Nov 23, 2012 at 3:10 PM, steve jenkin <sjenkin at canb.auug.org.au>wrote:

> I'm at a loss as to how to find what include directories are compiled
> into a version of 'gcc'.

What about gcc -v? Are you after the directories that were passed to gcc's
configure script?

$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-4'
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--with-arch-32=i586 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-4)

Carlo Hamalainen

More information about the linux mailing list