From: Boost-users [mailto:[hidden email]] On Behalf Of Andy via Boost-usersSent: 01 March 2017 19:11To: [hidden email]Cc: AndySubject: [Boost-users] How compile with clang ?
I have installed Clang at "c:\Program Files\LLVM"
try:b2 cleanb2 toolset=clang cxxflags="-std=c++1y -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=c:\boost -j 4 stage releaseb2 install toolset=clang cxxflags="-std=c++1y -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=c:\boost
but is error: fatal error: 'corecrt.h' file not found #include <corecrt.h>
I think corecrt.h is in one of the Windows Kits (note windows version 10.0.10586.0 specific? YMMV)
-I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt" solved this particular issue for me,
clang++.exe -Wall -fexceptions -g -m64 -II:\modular-boost -I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt" -c J:\Cpp\hellos\hello_boost\hello_boost.cpp -o obj\Debug\hellos\hello_boost\hello_boost.o
but other problems remain unsolved for me.
(I have also been stung by failure for b2 still failing to parse file specifications that include a space like Program Files).
Also confused by cached values not being removed by --reconfigure option.
The --debug-configuration and -d2 options may also help you.
You may need to delete the cached versions of vsvarsall.bat
For me at
b2_msvc_14.0_vcvarsall_x86.cmd and two others.
you can delete these are any time and they will be recreated. Cacheing is a valuable speedup but can be very confusing.
Paul A. Bristow
Kendal UK LA8 8AB
+44 (0) 1539 561830