From: Boost-users [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Andy via Boost-users
Sent: 01 March 2017 19:11
To: boost-users@lists.boost.org
Cc: Andy
Subject: [Boost-users] How compile with clang ?

 

I have installed Clang at "c:\Program Files\LLVM"

try:
b2 clean
b2 toolset=clang cxxflags="-std=c++1y -stdlib=libc++" linkflags="-stdlib=libc++" --prefix=c:\boost -j 4 stage release
b2 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

 

C:\Users\Paul\AppData\Local\Temp

 

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.

 

HTH

 

Paul

 

---

Paul A. Bristow

Prizet Farmhouse

Kendal UK LA8 8AB

+44 (0) 1539 561830