Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any good reason (except "GCC is better") to use the MinGW win32api/headers/libs with LLVM/Clang. Suppose that in two to three years, Clang has matured enough (in C++0x and performance) that it's a competitor/replacement and has its advantages over MSVC like GCC does on some accounts. Why on earth would one want to avoid using the MS library and header implementations of the win32 API, which is freely available in the form of the Windows SDK?

share|improve this question

One reason for the MingW header files to exist is certainly copyright: while they are "free as in beer", you are not allowed to redistribute them. Neither could the LLVM authors redistribute them, instead, every LLVM/Clang user would have to download them on their own. So it would be reasonable for Clang to provide a set of header files, and it would then be reasonable to use the MingW code as a starting point.

In addition, another reason for the MingW header files to exist (IIRC) is that the SDK headers use C extensions that were not supported by gcc. They may be supported now, so that reason may have gone.

share|improve this answer

The only real reason I can think of is to adopt a purely "Microsoft-free" philosophy.

You can ask the writers of the mingw win32 headers, but I suspect that there might also be some copyright concerns as well.

share|improve this answer
Well, I just don't "get" why you would not use the official SDK if possible. You use a proprietary OS, so it's only logical the SDK is proprietary as well. In this sense, MinGW would only be useful as long as GCC is incompatible with the Windows SDK. As Clang is striving for full compatibility, when it achieves that goal, why try to "reverse engineer" (not quite, but you know what I mean) something that is provided for free? One thing I see is that you'd need a Windows PC to use the SDK legally, but you'd need that to test your program regardless... – rubenvb Dec 11 '10 at 9:23
One thing I see is that you'd need a Windows PC to use the SDK legally -- That's probably the strongest point. – Robert Harvey Dec 13 '10 at 16:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.