-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: 03 September 2015 16:22 To: boost@lists.boost.org Subject: Re: [boost] Compiling with Clang 3.7.0 from windows
[Also example>b2 -a toolset=clang-3.7.0 address-model=64
fails to link as with no address-model specified (so default is 64 bit?)].
Suggestions?
(Have I got the wrong version of mingw? I have others from ming64 - how do I specify to use
On 03-Sep-15 5:02 PM, Paul A. Bristow wrote: those?)
Can you get hello-world to compile by hand? Like:
"C:\Program Files\LLVM\bin\clang++.exe" -g -m64 hello.cpp
No J:\Cpp\Misc\HelloWorld>"C:\Program Files\LLVM\bin\clang++.exe" -g -m64 -v hello.cpp clang version 3.7.0 (tags/RELEASE_370/final) Target: x86_64-w64-windows-gnu Thread model: posix "C:\\Program Files\\LLVM\\bin\\clang++.exe" -cc1 -triple x86_64-w64-windows-gnu -emit-obj -mrelax-all -disable-free -main-file-name hello.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -g -dwarf-column-info -resource-dir "C:\\Program Files\\LLVM\\bin\\..\\lib\\clang\\3.7.0" -internal-isystem "c:\\mingw\\mingw32\\include\\c++" -internal-isystem "c:\\mingw\\mingw32\\include\\c++\\mingw32" -internal-isystem "c:\\mingw\\mingw32\\include\\c++\\backward" -internal-isystem "c:\\mingw\\mingw32\\include\\c++\\4.8.1" -internal-isystem "c:\\mingw\\mingw32\\include\\c++\\4.8.1\\mingw32" -internal-isystem "c:\\mingw\\mingw32\\include\\c++\\4.8.1\\backward" -internal-isystem "c:\\mingw\\include\\c++\\4.8.1" -internal-isystem "c:\\mingw\\include\\c++\\4.8.1\\mingw32" -internal-isystem "c:\\mingw\\include\\c++\\4.8.1\\backward" -internal-isystem "c:\\mingw\\lib\\gcc\\mingw32\\4.8.1\\include\\c++" -internal-isystem "c:\\mingw\\lib\\gcc\\mingw32\\4.8.1\\include\\c++\\mingw32" -internal-isystem "c:\\mingw\\lib\\gcc\\mingw32\\4.8.1\\include\\c++\\backward" -internal-isystem "C:\\Program Files\\LLVM\\bin\\..\\lib\\clang\\3.7.0\\include" -internal-isystem "c:\\mingw\\lib\\gcc\\mingw32\\4.8.1\\include" -internal-isystem "c:\\mingw\\mingw32/sys-root/mingw/include" -internal-isystem "c:\\mingw\\lib\\gcc\\mingw32\\4.8.1\\include-fixed" -internal-isystem "c:\\mingw\\mingw32\\include" -internal-isystem "c:\\mingw\\include" -fdeprecated-macro -fdebug-compilation-dir "J:\\Cpp\\Misc\\HelloWorld" -ferror-limit 19 -fmessage-length 100 -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o "C:\\Users\\Paul\\AppData\\Local\\Temp\\hello-fe67e3.o" -x c++ hello.cpp clang -cc1 version 3.7.0 based upon LLVM 3.7.0 default target x86_64-w64-windows-gnu ignoring nonexistent directory "c:\mingw\mingw32\include\c++" ignoring nonexistent directory "c:\mingw\mingw32\include\c++\mingw32" ignoring nonexistent directory "c:\mingw\mingw32\include\c++\backward" ignoring nonexistent directory "c:\mingw\mingw32\include\c++\4.8.1" ignoring nonexistent directory "c:\mingw\mingw32\include\c++\4.8.1\mingw32" ignoring nonexistent directory "c:\mingw\mingw32\include\c++\4.8.1\backward" ignoring nonexistent directory "c:\mingw\include\c++\4.8.1" ignoring nonexistent directory "c:\mingw\include\c++\4.8.1\mingw32" ignoring nonexistent directory "c:\mingw\include\c++\4.8.1\backward" ignoring nonexistent directory "c:\mingw\mingw32/sys-root/mingw/include" ignoring nonexistent directory "c:\mingw\mingw32\include" #include "..." search starts here: #include <...> search starts here: c:\mingw\lib\gcc\mingw32\4.8.1\include\c++ c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\mingw32 c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\backward C:\Program Files\LLVM\bin\..\lib\clang\3.7.0\include c:\mingw\lib\gcc\mingw32\4.8.1\include c:\mingw\lib\gcc\mingw32\4.8.1\include-fixed c:\mingw\include End of search list. "c:\\mingw\\bin\\ld.exe" -m i386pep -Bdynamic -o a.exe "c:\\mingw\\lib\\crt2.o" "c:\\mingw\\lib\\gcc\\mingw32\\4.8.1\\crtbegin.o" "-Lc:\\mingw\\lib\\gcc\\mingw32\\4.8.1" "-Lc:\\mingw\\mingw32\\lib" "-Lc:\\mingw\\lib" "-Lc:\\mingw\\mingw32/sys-root/mingw/lib" "C:\\Users\\Paul\\AppData\\Local\\Temp\\hello-fe67e3.o" -lstdc++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt "c:\\mingw\\lib\\gcc\\mingw32\\4.8.1\\crtend.o" c:\mingw\bin\ld.exe: unrecognised emulation mode: i386pep Supported emulations: i386pe clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
? Which MinGW are you using?
Not the right one :-(( Which one do LLVM folks recommend to use? I'm confused, as ever. But seeing this apparently self-contradicting message: c:\mingw\bin\ld.exe: unrecognised emulation mode: i386pep Supported emulations: i386pe I think I'd prefer not to use any version! I think Edward Diener post gives me more clues on what I am doing wrong. I'll try his suggestion and report back. Thanks, as ever. Paul --- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830