<div>Hello!</div><div> </div><div>Windows 7 x64, </div><div>
</div><table width="96%">
<tbody>
<tr>
<td class="c" nowrap><pre>$ g++ --version
g++ (MinGW-builds: <a href="http://sourceforge.net/projects/mingwbuilds/">http://sourceforge.net/projects/mingwbuilds/</a>) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang --version
clang version 3.2 (trunk 161402)
Target: x86_64-w64-mingw32
Thread model: posix</pre></td></tr></tbody></table><br>== Sample code:<br>
<table width="96%">
<tbody>
<tr>
<td class="c" nowrap><pre><span class="kw">#include <iostream></span></pre><pre><span class="kw">int main( int argc, char ** argv ) {<br>    try {<br>        throw std::exception();<br>    } catch ( std::exception & e ) {<br>
    }<br>    return 0;<br>}<br></span></pre></td></tr></tbody></table><div> </div><div>== build-sample.cmd:
</div><div>@echo off</div><div>setlocal</div><div>set LIBPATH=<br>set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0<br>set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc<br>set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/../lib<br>
set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../lib<br>set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib<br>set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..</div>
<div>set LIBS=<br>set LIBS=%LIBS% -lmingw32<br>set LIBS=%LIBS% -lgcc_s<br>set LIBS=%LIBS% -lgcc<br>set LIBS=%LIBS% -lmoldname<br>set LIBS=%LIBS% -lmingwex<br>set LIBS=%LIBS% -lmsvcrt<br>set LIBS=%LIBS% -lpthread<br>set LIBS=%LIBS% -ladvapi32<br>
set LIBS=%LIBS% -lshell32<br>set LIBS=%LIBS% -luser32<br>set LIBS=%LIBS% -lkernel32<br>set LIBS=%LIBS% -liconv<br>set LIBS=%LIBS% -lmingw32<br>set LIBS=%LIBS% -lgcc_s<br>set LIBS=%LIBS% -lgcc<br>set LIBS=%LIBS% -lmoldname<br>
set LIBS=%LIBS% -lmingwex<br>set LIBS=%LIBS% -lmsvcrt<br>set LIBS=%LIBS% -lstdc++</div><div>set LLVM_ROOT=%USERPROFILE%\Documents\build-system\install\llvm<br>set MG_ROOT=C:\MinGW<br>set PATH=%LLVM_ROOT%\bin;%PATH%<br>set PATH=%MG_ROOT%\bin;%PATH%</div>
<div>set INCLUDE=<br>set INCLUDE=%INCLUDE% -I %MG_ROOT%\x86_64-w64-mingw32\include<br>set INCLUDE=%INCLUDE% -I %MG_ROOT%\lib\gcc\x86_64-w64-mingw32\4.7.0\include\c++<br>set INCLUDE=%INCLUDE% -I %MG_ROOT%\lib\gcc\x86_64-w64-mingw32\4.7.0\include\c++\x86_64-w64-mingw32<br>
rem set INCLUDE=%INCLUDE% -I %LLVM_ROOT%\include</div><div>del test.o<br></div><div>clang++ --verbose -static -fexceptions -o test.exe %LIBPATH% %INCLUDE% test.cpp %LIBS% -v</div><div> </div><div>== ...and its fail:</div>
<div> </div><table width="96%">
<tbody>
<tr>
<td class="c" nowrap><pre>...Temp/test-967321.o:fake:(.text+0xd9): undefined reference to `_Unwind_Resume'
...Temp/test-967321.o:fake:(.eh_frame+0x63): undefined reference to `__gxx_personality_v0'</pre></td></tr></tbody></table><div><br>== g++ has expected result:</div><div> </div><div>$ g++ -o test.exe test.cpp -lstdc++</div>
<div>$ .\test.exe</div><div> </div><div> </div><div>Is there a problem with my hands?<br></div><div> </div>