Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

building boost with clang 3.8 on windows

Tags:

boost

clang++

From some Googling around it seems that clang's support for windows has been improving recently and boost's support for clang may also have improved. But I'm fairly new to all this heavy-lifting compiler configuration stuff and new to boost, so I'm not sure what the current status really is.

I'm trying to run the command:

 b2 --build-dir=build toolset=clang --build-type=complete stage

as suggested in section 5.2.4 in www.boost.org/.../getting_started/windows.

This does work to some extent, but watching the logs being printed to screen I see a few worrying things:

  • statements starting clang-linux.compile.c++.... even though I am on windows.
  • 12 warnings generated. (or similar) perhaps always these are -Wunused-local-typedef, but I'm not sure.
  • 2 warnings and 8 errors generated (or similar) surely if there are errors the build has failed? How am I supposed to know which component of boost has not built properly and what can I do to fix this?

I'm not clear whether I need MSVC the compiler, Visual Stufio the IDE, and/or MinGW and whether I need to manually set flags to pass to the compiler? Perhaps clang+boost is not ready for windows yet?

Ultimately I want to use boost.python, and at a later date maybe boost.coroutine.

Presumably if I want to use clang for my own projects I need to compile boost with clang too?

like image 908
dan-man Avatar asked Oct 09 '15 15:10

dan-man


1 Answers

bootstrap --with-toolset=clang-win
b2 toolset=clang-win

Make sure that clang.exe is on your PATH.

like image 83
tim_hutton Avatar answered Sep 20 '22 22:09

tim_hutton