[llvm-dev] LLVM 3.7.0 build errors on Windows

Nico Rieck via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 3 03:57:17 PDT 2015


On 03.09.2015 10:28, Russell Wallace via llvm-dev wrote:
> I have the same setup as you, and it's working fine, but I think that's
> because I have #include <windows.h> after the llvm headers. I tried moving
> it before them just now and I get the same error messages as you. I also
> took a look at C:\llvm\tools\clang\lib\Driver\MSVCToolChain.cpp and it
> likewise puts the windows header after the llvm headers. Can you move it to
> after?

Support/COFF.h is incompatible with winnt.h because the former defines
the IMAGE_* constants as enums while the latter uses macros. If you
cannot avoid including both headers in the same TU you have to undef
those macros.

-Nico


More information about the llvm-dev mailing list