[cfe-dev] (no subject)
Василий Кузнецов
kuznetsov.vasya at gmail.com
Tue Aug 7 09:56:41 PDT 2012
Hello!
Windows 7 x64,
$ g++ --version
g++ (MinGW-builds: http://sourceforge.net/projects/mingwbuilds/) 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
== Sample code:
#include <iostream>
int main( int argc, char ** argv ) {
try {
throw std::exception();
} catch ( std::exception & e ) {
}
return 0;
}
== build-sample.cmd:
@echo off
setlocal
set LIBPATH=
set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0
set LIBPATH=%LIBPATH% -Lc:/mingw/bin/../lib/gcc
set LIBPATH=%LIBPATH%
-Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib/../lib
set LIBPATH=%LIBPATH%
-Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../lib
set LIBPATH=%LIBPATH%
-Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/lib
set LIBPATH=%LIBPATH%
-Lc:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../..
set LIBS=
set LIBS=%LIBS% -lmingw32
set LIBS=%LIBS% -lgcc_s
set LIBS=%LIBS% -lgcc
set LIBS=%LIBS% -lmoldname
set LIBS=%LIBS% -lmingwex
set LIBS=%LIBS% -lmsvcrt
set LIBS=%LIBS% -lpthread
set LIBS=%LIBS% -ladvapi32
set LIBS=%LIBS% -lshell32
set LIBS=%LIBS% -luser32
set LIBS=%LIBS% -lkernel32
set LIBS=%LIBS% -liconv
set LIBS=%LIBS% -lmingw32
set LIBS=%LIBS% -lgcc_s
set LIBS=%LIBS% -lgcc
set LIBS=%LIBS% -lmoldname
set LIBS=%LIBS% -lmingwex
set LIBS=%LIBS% -lmsvcrt
set LIBS=%LIBS% -lstdc++
set LLVM_ROOT=%USERPROFILE%\Documents\build-system\install\llvm
set MG_ROOT=C:\MinGW
set PATH=%LLVM_ROOT%\bin;%PATH%
set PATH=%MG_ROOT%\bin;%PATH%
set INCLUDE=
set INCLUDE=%INCLUDE% -I %MG_ROOT%\x86_64-w64-mingw32\include
set INCLUDE=%INCLUDE% -I
%MG_ROOT%\lib\gcc\x86_64-w64-mingw32\4.7.0\include\c++
set INCLUDE=%INCLUDE% -I
%MG_ROOT%\lib\gcc\x86_64-w64-mingw32\4.7.0\include\c++\x86_64-w64-mingw32
rem set INCLUDE=%INCLUDE% -I %LLVM_ROOT%\include
del test.o
clang++ --verbose -static -fexceptions -o test.exe %LIBPATH% %INCLUDE%
test.cpp %LIBS% -v
== ...and its fail:
...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'
== g++ has expected result:
$ g++ -o test.exe test.cpp -lstdc++
$ .\test.exe
Is there a problem with my hands?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120807/09d375e3/attachment.html>
More information about the cfe-dev
mailing list