title: Using Clang on Mingw 64bit
body: <p>I want to have clang in addition to <strong>GCC</strong> in a <strong>MinGW-64bit</strong> environment on Windows 7, both using the standard library from gcc. I'm using gcc_x64_4.8.1_win32_seh_rev1 and Qt from <a href="http://sourceforge.net/projects/mingwbuilds/" rel="nofollow noreferrer">http://sourceforge.net/projects/mingwbuilds/</a>.</p>
  
  <p>I built clang 3.3 in this environment, without any flags (just getting around the <code>HAVE_EHTABLE_SUPPORT</code> compile problem).</p>
  
  <p>I use a qmake build process and the project file has these lines additionally for clang (just release mode):</p>
  
  <pre><code>QMAKE_CC = clang
  QMAKE_CXX = clang++
  QMAKE_CXXFLAGS_RELEASE += -Wno-ignored-attributes
  QMAKE_CXXFLAGS_RELEASE += -I"C:/tc/gcc_x64_4.8.1_win32_seh_rev1/mingw64/lib/gcc/x86_64-w64-mingw32/4.8.1"
  QMAKE_CXXFLAGS_RELEASE += -I"C:/tc/gcc_x64_4.8.1_win32_seh_rev1/mingw64/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++"
  QMAKE_CXXFLAGS_RELEASE += -I"C:/tc/gcc_x64_4.8.1_win32_seh_rev1/mingw64/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/x86_64-w64-mingw32"
  QMAKE_CXXFLAGS_RELEASE += -I"C:/tc/gcc_x64_4.8.1_win32_seh_rev1/mingw64/x86_64-w64-mingw32/include"
  </code></pre>
  
  <p>Compiling gets down to:</p>
  
  <pre><code>C:/tc/gcc_x64_4.8.1_win32_seh_rev1/mingw64/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++\bits/random.h:106:26: error:
        __int128 is not supported on this target
        { typedef unsigned __int128 type; };
                           ^
  </code></pre>
  
  <p>Searching the internet gave references to _mingw.h, but I don't know what is wrong there:</p>
  
  <pre><code>#if (__clang_major__ &gt; 3 || (__clang_major__ == 3 &amp;&amp; __clang_minor__ &gt;= 1)) &amp;&amp; \
      !defined(__SIZEOF_INT128__) /* clang &gt;= 3.1 has __int128 but no size macro */
  #define __SIZEOF_INT128__ 16
  #endif
  </code></pre>