Forwarding to cfe-dev ...
In particular, I'm not looking to build llvm or clang from source but rather
how to use the precompiled binary made available from llvm's download
section under mingw windows setup.
3.2 Clang Mingw experimental was build and tested on a system with
fresh default Msys/MingW installation using g++.exe (GCC) 4.6.2.
At the moment I downloaded the latest provided 3.2 Clang Mingw experimental
binary. However, when trying to compile a test program with clang++ it isn't
looking in the right place for the mingw header includes, libstdc++,
win32api and the like.
If you are not using g++.exe (GCC) 4.6.2. or have non default
installation paths then you might encounter problems.
I would get silly errors like:
main.cpp:1:10: fatal error: 'iostream' file not found
1 error generated.
What's the recommended way to correct this problem? Adding '-I' for mingw's
header location might be one way but there has to be a better way to tell
clang on where to look for this by default.
First check and confirm your g++ installed version is g++.exe
(GCC)4.6.2. If your g++ version is different then you can try
setting clang options, do:
And look for -isysroot, -isystem , detailed description is in
the clang documentation. This is still experimental build!