title: Compiling c program with MinGW causes cc1.exe fatal error
body: <p>I installed MinGW-w64 using win-builds.
  It all went ok but then when I compile a file using</p>
  
  <blockquote>
    <p><code>gcc -Wall -o prog.exe main.c</code></p>
  </blockquote>
  
  <p>I get this error</p>
  
  <blockquote>
    <p><code>cc1.exe: fatal error: Files/win-builds-1.5.0/include: No such file or directory</code> 
    <code>compilation terminated.</code></p>
  </blockquote>
  
  <p>I have updated gcc path. I get the same error when I try to build on eclipse.
  The location where win-builds put all the files is <code>C:\Program Files\win-builds-1.5.0\</code> and the folder <code>\include\</code> exists.</p>
  
  <p>My guess is that <code>cc1.exe</code> is trying to access <code>C:\Program Files\win-builds-1.5.0\include</code> but, for some reason it is separating <code>C:\Program</code> of <code>Files\win-builds-1.5.0\include</code>.</p>
  
  <p>How can I get the compiler to work?
  <a href="https://i.stack.imgur.com/bTqYT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bTqYT.png" alt="Error"></a></p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here is the code to be compiled</p>
  
  <pre><code>/*
   * main.c
   *
   *  Created on: 13/06/2018
   *      Author: haslima
   */
  #include &lt;stdio.h&gt;
  
  int main()
  {
      printf("Hello World");
      return 1;
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>when I run <code>gcc -v -c -o prog.exe main.c</code> I get this output:</p>
  
  <pre><code>Reading specs from c:/program files/win-builds-1.5.0/bin/../lib64/gcc/x86_64-w64-mingw32/4.8.3/specs
  COLLECT_GCC=gcc
  Target: x86_64-w64-mingw32
  Configured with: ../gcc-4.8.3/configure --prefix=/opt/windows_64 --with-sysroot=/opt/windows_64 --libdir=/opt/windows_64/lib64 --mandir=/opt/windows_64/man --infodir=/opt/windows_64/info --enable-shared --disable-bootstrap --disable-multilib --enable-threads=posix --enable-languages=c,c++ --enable-checking=release --enable-libgomp --with-system-zlib --with-python-dir=/lib64/python2.7/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --enable-java-home --with-java-home=/opt/windows_64/lib64/jvm/jre --with-jvm-root-dir=/opt/windows_64/lib64/jvm --with-jvm-jar-dir=/opt/windows_64/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar='/home/adrien/projects/win-builds-1.5/slackware64-current/d/gcc/antlr-*.jar' --disable-java-awt --disable-gtktest --build=x86_64-slackware-linux --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32
  Thread model: posix
  gcc version 4.8.3 (GCC)
  COLLECT_GCC_OPTIONS='-v' '-c' '-o' 'prog.exe' '-mtune=generic' '-march=x86-64'
   c:/program files/win-builds-1.5.0/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.3/cc1.exe -quiet -v -iprefix c:\program files\win-builds-1.5.0\bin\../lib64/gcc/x86_64-w64-mingw32/4.8.3/ -D_REENTRANT -IC:/Program Files/win-builds-1.5.0/include main.c -quiet -dumpbase main.c -mtune=generic -march=x86-64 -auxbase-strip prog.exe -version -o C:\Users\hasli\AppData\Local\Temp\ccnpAzB7.s
  GNU C (GCC) version 4.8.3 (x86_64-w64-mingw32)
          compiled by GNU C version 4.8.3, GMP version 5.1.3, MPFR version 3.1.2, MPC version 0.8.2
  GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
  ignoring duplicate directory "c:/program files/win-builds-1.5.0/lib64/gcc/../../lib64/gcc/x86_64-w64-mingw32/4.8.3/include"
  ignoring nonexistent directory "/opt/windows_64/opt/windows_64/lib64/gcc/x86_64-w64-mingw32/4.8.3/../../../../include"
  ignoring duplicate directory "c:/program files/win-builds-1.5.0/lib64/gcc/../../lib64/gcc/x86_64-w64-mingw32/4.8.3/include-fixed"
  ignoring duplicate directory "c:/program files/win-builds-1.5.0/lib64/gcc/../../lib64/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mingw32/include"
  ignoring nonexistent directory "/opt/windows_64/mingw/include"
  ignoring nonexistent directory "C:/Program"
  #include "..." search starts here:
  #include &lt;...&gt; search starts here:
   c:\program files\win-builds-1.5.0\bin\../lib64/gcc/x86_64-w64-mingw32/4.8.3/include
   c:\program files\win-builds-1.5.0\bin\../lib64/gcc/x86_64-w64-mingw32/4.8.3/include-fixed
   c:\program files\win-builds-1.5.0\bin\../lib64/gcc/x86_64-w64-mingw32/4.8.3/../../../../x86_64-w64-mingw32/include
  End of search list.
  cc1.exe: fatal error: Files/win-builds-1.5.0/include: No such file or directory
  compilation terminated.
  </code></pre>