title: Msys2 and Mingw64 system include directory is incorrect preventing the use of GLib
body: <p>I am doing C development on windows and installed Msys2. With Msys2 <code>pacman</code> I installed 64 bit mingw and Glib. I can use the gcc that was installed to compile. The Glib headers is now at <code>C:\msys64\mingw64\include\glib-2.0</code> and <code>C:\msys64\usr\include\glib-2.0</code>.</p>
  
  <p>When adding <code>#include &lt;gmodule.h&gt;</code> to a source file and compiling I get:
  <code>fatal error: gmodule.h: No such file or directory</code></p>
  
  <p>Checking the include paths with <code>gcc -xc -E -v -</code> I see errors:</p>
  
  <pre><code>Using built-in specs.
  COLLECT_GCC=gcc
  Target: x86_64-w64-mingw32
  Configured with: ../gcc-8.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 -
  -host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include
  --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=ada,c,lto,c++,objc,obj-c++,fortran --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
  Thread model: posix
  gcc version 8.2.0 (Rev1, Built by MSYS2 project)
  COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
   C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/cc1.exe -E -quiet -v -iprefix C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/ -D_REENTRANT - -mtune=generic -march=x86-64
  ignoring duplicate directory "C:/msys64/mingw64/lib/gcc/../../lib/gc/x86_64-w64-mingw32/8.2.0/include"
  ignoring nonexistent directory "F:/msys64/mingw64/include"
  ignoring nonexistent directory "/mingw64/include"
  ignoring duplicate directory "C:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.2.0/include-fixed"
  ignoring duplicate directory "C:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/include"
  ignoring nonexistent directory "F:/msys64/mingw64/x86_64-w64-mingw32/include"
  #include "..." search starts here:
  #include &lt;...&gt; search starts here:
   C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/include
   C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../include
   C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/include-fixed
   C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/../../../../x86_64-w64-mingw32/include
  End of search list.
  </code></pre>
  
  <p>How do I fix include paths so that gcc can find the GLib headers? I could add it to a spec file or <code>C_INCLUDE_PATH</code> but I it bypasses the error instead of fixing it.</p>