[cfe-dev] Toolset for clang in Windows under Boost
Francois Pichet
pichet2000 at gmail.com
Wed Sep 22 16:46:54 PDT 2010
>> clang can compile boost. On windows, it should theoretically work but
>> you may need to tweak the compiler command line options to make it
>> work. For example, if you compile clang with VS, clang will search the
>> msvc include directories to find #include path.
>
> I do not understand this. I am not talking about building clang, but
> using clang to compile Boost. What does VS have to do with that ?
Because you asked about building clang using Visual Studio in your
first question. So I thought you wanted to build clang using visual
studio and then using the resulting clang to build boost. It is not
going to work because when you build clang using visual studio the
default configuration is to search in the msvc include directories for
standard headers. clang cannot parse these headers.
>
>> But clang cannot
>> currently parse the msvc header files.
>
> Are you saying that clang needs the msvc header files under Windows ?
Not, if you build using MinGW.
If you build with MSVC clang will try to include from msvc by default.
To get around that use option -nostdinc++ and -nostdinc.
> It sounds like you are saying that when clang is built with VS it
> automatically uses the msvc header files awhen it is used to compile
> source files but if it is built with MingW it automatically uses the
> MingW header files when it is used to compile source files. Can that
> really be so ? I would have assumed that however it is built it would
> use its own header files and standard library.
That's the way clang works as I understand. clang doesn't currently
ship with its own complete standard library. One is currently in
development ( libc++) but doesn't work on windows.
> As far as the Windows SDK header files I would guess that some Boost
> libraries do use them, but I do not know why they would not be able to
> be used by clang.
clang cannot currently compile the Windows SDK as provided by Microsoft.
clang can compile the Windows headers shipped with MinGW.
Anyway that's the way I understand it... I am not a clang expert yet.
I am still learning about it.
More information about the cfe-dev
mailing list