Link errors in Windows

I need clang for my experimentations in Windows. I tried to compile and link with clang on Windows. However, I’m getting a bunch of linking errors. For example:

error LNK2005: _InterlockedIncrement64 already defined in cc-000000.o
error LNK2005: _InterlockedDecrement64 already defined in cc-000000.o
error LNK2005: _InterlockedExchange64 already defined in cc-000000.o
error LNK2005: _InterlockedExchangeAdd64 already defined in cc-000000.o

I was able to see the reason. When a source file includes “Windows.h” and does use Win32 APIs, then clang emits some Win32 API definitions in the object files. I’ve confirmed by looking bitcode.

Hello

I was able to see the reason. When a source file includes "Windows.h" and
does use Win32 APIs, then clang emits some Win32 API definitions in the
object files. I've confirmed by looking bitcode.

It seems that the stuff comes from your headers. It might be possible
that they are just broken, but it's hard to say w/o looking into
source code, etc.
Please consider filling a PR on this matter.