On 6/23/2015 7:41 AM, Paul A. Bristow wrote:
I have installed Clang 3.6.1 (along with previously used versions of GCC)
downloaded from LLVM and using the clang for LLVM Windows installer on Windows 8.1
I:\modular-boost\libs\fixed_point\example>clang++ --version clang version 3.6.1 (tags/RELEASE_361/final) Target: i686-pc-windows-gnu Thread model: posix
suggests that I have the compiler in place OK and it should be in my PATH (becos I asked for it to be).
--debug-configuration
notice: will use 'C:/LLVM/bin/clang++.exe' for clang-linux, condition <toolset>clang-linux-3.6.1
For a project, I have a jamfile starting
project : requirements <include>../include # quickdox/include <include>../../.. # modular-boost root #toolset requirements. # GCC requirements. #<toolset>gcc:<cxxflags>-std=gnu++11 # If requires C++11 library. <toolset>gcc:<cxxflags>-Wno-unused-local-typedefs <toolset>gcc:<cxxflags>-Wno-missing-braces # Clang requirements. #<toolset>clang:<cxxflags>-std=c++11 # If requires C++11 library.
(I also have environment BOOST_ROOT = I:\modular-boost)
when I run b2 toolset=gcc
all compiles and run as expected.
when I run b2 toolset=clang
I get messages like
common.mkdir ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\clang-linux-3.6.1 common.mkdir ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\clang-linux-3.6.1\debug
clang-linux.compile.c++.without-pth ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\ clang-linux-3.6.1\debug\quick_auto_dox_index.obj quick_auto_dox_index.cpp:53:10: fatal error: 'iostream' file not found (or other files like cstddef, iomanip on other projects) #include <iostream> ^ 1 error generated.
"C:/LLVM/bin/clang++.exe" -c -x c++ -O0 -g -fno-inline -Wall -g -march=i686 -m32 -DBOOST_ALL_NO_L IB=1 -I"..\..\.." -I"..\include" -o "..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test \clang-linux-3.6.1\debug\quick_auto_dox_index.obj" "quick_auto_dox_index.cpp"
(Full log attached).
This suggests that it is not finding the system file <iostream> ...
but I'm puzzled at what is missing (and why).
Suggestions most welcome.
Reiterating what Peter says you need a mingw distribution at c:\mingw or you need c:\mingw to be a symbolic directory link to your Mingw distribution. Not only that but the distribution needs to be mingw and not mingw-64. I have mentioned this dependence on only mingw (as oposed to the better mingw-64 ) on the clang developers mailing list and someone has replied telling me that they intend to work on compatibility with mingw-64, but you know how that goes... I have found that the latest mingw distribution works with clang.