<div dir="ltr">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?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 3, 2015 at 2:02 AM, Ben Swift via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm working on a cross-platform project which links (statically) against<br>
LLVM, which I use for MCJIT purposes.<br>
<br>
Everything was fine on 3.4.2. I'm just experimenting with upgrading to<br>
3.7.0, and everything works fine on OSX & Linux once I changed my<br>
project to reflect the API updates.<br>
<br>
On Windows, I get a bunch of compile errors - hundreds of them, but<br>
variations on a couple of different themes, such as<br>
<br>
Error   C3805   '(': unexpected token, expected either '}' or a ','<br>
  llvm\Support\COFF.h  168<br>
Error   C3646   'Checksum': unknown override specifier<br>
llvm\Object\COFF.h              50<br>
Error   C4430   missing type specifier - int assumed. Note: C++ does not<br>
support default-int    llvm\Object\COFF.h      52<br>
<br>
All the errors are reported in LLVM header files, mostly<br>
llvm/Support/COFF.h and llvm/Object/COFF.h<br>
<br>
I'm using Visual Studio Community 2015, the CXX compiler identification<br>
is MSVC 19.0.23026.0<br>
<br>
My CPP includes are:<br>
<br>
WIN32<br>
_WINDOWS<br>
NDEBUG<br>
_CRT_SECURE_NO_DEPRECATE<br>
_CRT_SECURE_NO_WARNINGS<br>
_CRT_NONSTDC_NO_DEPRECATE<br>
_CRT_NONSTDC_NO_WARNINGS<br>
_SCL_SECURE_NO_DEPRECATE<br>
_SCL_SECURE_NO_WARNINGS<br>
__STDC_CONSTANT_MACROS<br>
__STDC_FORMAT_MACROS<br>
__STDC_LIMIT_MACROS<br>
_GNU_SOURCE<br>
%(PreprocessorDefinitions)<br>
<br>
Now, a couple of things are suspicious:<br>
<br>
- in googling around it seems like there are some problems with<br>
including Windows.h (which I have to include for other reasons) as well<br>
as the LLVM headers, at least with previous versions of LLVM.<br>
- on OSX, I did have to add a -std=c++11 flag before it would compile.<br>
But I thought I didn't need/couldn't do that on Windows?<br>
<br>
Does anyone have any idea what might be the problem, or ideas for<br>
solutions/workarounds?<br>
<br>
Cheers<br>
Ben<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>