You can use GCC on Windows by downloading MingW (discontinued) or its successor Mingw-w64.

Answer from Ben Hoffstein on Stack Overflow
🌐
Visual Studio
visualstudio.microsoft.com › vs › features › cplusplus
C++ Compiler | Download C++ for Windows - Visual Studio IDE
July 6, 2026 - Build modern C and C++ apps for Windows using tools of your choice, including MSVC, Clang, CMake, and MSBuild
Discussions

Does Windows have an integrated built-in C/C++ compiler package? - Stack Overflow
You can install the C++ microsoft toolset (not from the command line) Then you can use the "native" windows compiler (cl.exe) without installing an IDE. Also you can use MinGW, which lets you install a gcc for windows. More on stackoverflow.com
🌐 stackoverflow.com
What Windows compiler am I supposed to be using as a beginner?
I've used mingw-w64 without any problem. I assume by Windows you mean you're using windows, not that you need to use windows specific libraries. So do you really need more than run gcc... probably not More on reddit.com
🌐 r/C_Programming
51
26
September 14, 2024
windows - Is there a single official C compiler, and how do I install it? - Stack Overflow
You have to use a third-party compiler. The most common for Linux and macOS are called GCC (GNU Compiler Collection) and Clang. Since you ask for Windows, there are several C compilers available. More on stackoverflow.com
🌐 stackoverflow.com
good c/c++ compiler for windows - Stack Overflow
Does anyone know of a c/c++ compiler that is easily usable with windows? I have a bit of experience with gcc, but I would like to take a crack at developing some code like this on a windows machine... More on stackoverflow.com
🌐 stackoverflow.com
People also ask

Can I use a C Compiler for Windows on Windows 11?
Yes, all major compilers like GCC (via MinGW), Clang, and MSVC work on Windows 11. Just make sure to download the latest compatible versions.
🌐
upgrad.com
upgrad.com › home › tutorials › software & tech › c compiler for windows
Best C Compiler for Windows: Complete Guide
Do I need a different C Compiler for C++ on Windows?
Not really. Most C compilers, like GCC or MSVC, also support C++. Just use the right file extension (.cpp) and you're good to go.
🌐
upgrad.com
upgrad.com › home › tutorials › software & tech › c compiler for windows
Best C Compiler for Windows: Complete Guide
How do I install a C Compiler for Windows using MinGW?
Download the MinGW installer, run it, mark all packages for installation, and apply changes. Then, update your PATH variable so you can compile from the terminal.
🌐
upgrad.com
upgrad.com › home › tutorials › software & tech › c compiler for windows
Best C Compiler for Windows: Complete Guide
🌐
Reddit
reddit.com › r/c_programming › easiest way to set up c compiler on windows 10 (if you use visual studio code)?
r/C_Programming on Reddit: Easiest way to set up C compiler on Windows 10 (if you use Visual Studio Code)?
March 8, 2023 -

I've been learning C and playing around with it for a couple of months already.

I'm following CS50 course and first half of the course is almost entirely in C.

That being said, I only used their online codespaces so far, - and for my own personal practice, I used online complilers such as https://www.programiz.com/c-programming/online-compiler/

and https://www.onlinegdb.com/online_c_compiler .

This allowed me to focus on coding and not worry about compiling. I've made some stuff already, entirely using these tools.

However, now arrives the time that I need my own compiler on local machine.

The main reason is that I want to start practicing working with files on my own hard disk, and also using libraries outside of what these tools offer, such as conio.h.

I already tried to google how to set-up a compiler in Windows, but I've bumped into many hoops and obstacles and it's not (at least for me) as straightforward as it might seem.

So I'm asking you for help to set up my own coding environment for C in Windows, where I could compile the files (ideally with make too, and not just clang), where I could include external libraries, where I could work with files on my own HDD, etc... And ideally, where I could even turn these files into classical .exe files.

Thanks!

EDIT: Resolved:

Installing Visual Studio 2022 Community with included tools for C++, and then running Developer Command Prompt allowed me to compile C files by using command: cl filename.c which returns exe file, filename.exe . This exe file can be started by simply executing filename in command prompt or even from Windows by simply double clicking on its icon, like any other file. Thanks for all the responses, especially to RidderHaddock and _mutaz_ who gave me best directions.

🌐
SourceForge
sourceforge.net › projects › gcc-win64
gcc-win64 download | SourceForge.net
September 20, 2026 - Download gcc-win64 for free. x64 build of GCC for Windows. x64 C/C++ compiler for Windows using (unofficial build): - gmp - mpfr - mpc - isl - cloog - mingw-w64 - gcc - seh You need at least core2 command set support to run this application. Note that every version with bundled gdb needs at ...
🌐
WinLibs
winlibs.com
WinLibs - GCC+MinGW-w64 compiler for Windows
Jump to: Download | How to use from Windows Command Prompt | How to use from Code::Blocks | Philosophy | Donate · In short: it's a free C and C++ compiler for Microsoft Windows.
🌐
Upgrad
upgrad.com › home › tutorials › software & tech › c compiler for windows
Best C Compiler for Windows: Complete Guide
July 9, 2025 - For example, compiling with Visual Studio lets you directly integrate with Windows GUI tools. On the other hand, MinGW offers a lightweight GCC-based environment that works well for console apps. Several types of C compilers are available for Windows.
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › cpp › build › walkthrough-compile-a-c-program-on-the-command-line
Compile a C Program on the Command Line | Microsoft Learn
In most cases, portable C code compiles and runs as expected. The compiler provides optional support for the changes in ISO C11 and C17. To compile with C11 and C17 support, use the compiler flag /std:c11 or /std:c17. C11 and C17 support requires Windows SDK 10.0.20201.0 or later.
🌐
Dev-cpp
dev-cpp.com
Home | Dev-C++ Official Website
Dev-C++ is a full-featured C and C++ Integrated Development Environment (IDE) for Windows. Free, open source, and used by millions of developers worldwide.
Top answer
1 of 9
17

Since the kernel of Windows and the Windows API are written in C

Microsoft doesn't ship a compiler, or the required Windows SDK headers/libs (also includes a bunch of other useful development tools) for Windows in the installation. Microsoft Visual C++ (part of Visual Studio) would be the equivalent "built in" choice although I am not sure if Microsoft ever specify exactly which version they use for a given Windows build and it is common to have lots of software built with different compilers/versions (including the various non-Microsoft ones).

As well as the full Visual Studio package with the IDE and other tools. Microsoft provide some components separately, such as the Build Tools for Visual Studio 2019.

I am sure this is for many reasons like most users not being interested in compiling their own software, and Microsoft still sells Visual Studio separately to larger organisations (historically to most serious users, but "Community" edition is now pretty nonrestrictive for individuals and small business).

2 of 9
11

You will need two things:

  • The command-line build tools. These can be found on the Visual Studio Downloads page under Tools for Visual Studio -> Build Tools for Visual Studio. This will include the compiler (cl.exe) and linker (link.exe) for the MSVC build toolchain.
  • The Windows SDK. The latest version of the SDK can currently be found here. This page has a tendency to move around, but googling for Windows SDK usually gives you the right page immediately. The SDK contains all the headers and libraries required to build Windows applications and make use of the Windows native API. The Windows SDK contains a lot of stuff which you may or may not need. You will almost certainly want to install the Windows SDK for Desktop C++ x86 Apps and Windows SDK for Desktop C++ amd64 Apps components. Most of the other stuff should be optional, but some of it is nonetheless highly useful.
  • You may want to download additional packages such as the Windows Debugger (which is an entirely different application than the Visual Studio debugger) or the Driver SDK, depending on what kind of things you want to develop.

Note that even if you don't intend to use the IDE in the end, installing the full Community Edition of Visual Studio is a far more convenient way to get a working build environment, so unless you have a really good reason not to, just go with the full package and choose to never open the IDE.

🌐
Ultimate Systems Blog
blog.usro.net › 2025 › 01 › best-c-compiler-for-windows-11-top-picks-for-developers
Best C Compiler for Windows 11: Top Picks for Developers
July 21, 2026 - GCC, available through MinGW (Minimalist GNU for Windows), is a robust and widely-used compiler for C.
🌐
Ultimate Systems Blog
blog.usro.net › 2025 › 04 › best-c-compilers-for-windows
Best C Compilers for Windows - Ultimate Systems Blog
July 20, 2026 - WordPress vs HTML Website might ... feature-rich, all-in-one solution and are comfortable with a robust toolset, Microsoft Visual Studio Community Edition is hard to beat....
Top answer
1 of 4
3

"Is there a single official C compiler, and how do I install it?"

No, there is no compiler provided by the C standard and thus no way to install it.

You have to use a third-party compiler. The most common for Linux and macOS are called GCC (GNU Compiler Collection) and Clang.

Since you ask for Windows, there are several C compilers available.

Take a look at the answers and comments to this question of mine a while ago:

Has Windows an integrated built-in C/C++ compiler package?

There you can find the at least many options.

The way to install you can find in the respective documentations and isn't object to be defined here as this would explode the frame.

My personal recommendation is GCC with the MingW_64 package. How you install it, you can find, as said, in the documentation.

2 of 4
1

Is there a single official C compiler? No.

Are you sure that you insist on the "official" one (which is not even clearly defined as the other comment pointed out)?
In your situation I would look for a "convenient" installation.

This more or less leads to the answer to "How to install it?"
The selection and indirectly the way to install it, is most wisely based on asking your friends/colleagues/fellows, because you will have questions and they are primarily best answered by any human you can directly ask. StackOverflow is only second place.
If that does not help you selecting one, I recommend to use yoru favorite search engine on "install gcc". In mine, the 10th result is my favorite.

Maybe go one step further towards "convenient" and search for "free IDE C" my favorite is the 6th result.
But of course this is not to tell you my favorite in a hidden way. You just look at the results, check the first few out and decide based on what you like best.

🌐
Scaler
scaler.com › home › topics › download and install c/gcc compiler for windows
Download and Install C/GCC Compiler for Windows - Scaler Topics
March 20, 2024 - Sublime Text: Sublime text is a ... community-built, and is maintained under a free license. ... Following are the steps to download and install the MinGW GCC Compiler for windows....
🌐
freeCodeCamp
freecodecamp.org › news › how-to-install-c-and-cpp-compiler-on-windows
How to Install C and C++ Compilers on Windows
February 22, 2022 - If you want to run C or C++ programs in your Windows operating system, then you need to have the right compilers. The MinGW compiler is a well known and widely used software for installing GCC and G++ compilers for the C and C++ programming ...
🌐
GitHub
github.com › vlang › v › wiki › Installing-a-C-compiler-on-Windows
Installing a C compiler on Windows · vlang/v Wiki · GitHub
Change your selection accordingly if you have Windows 10. It is also recommended to use either the Visual Studio Development Command Prompt (20XX) or Visual Studio Development PowerShell (20XX) which adds cl.exe and other relevant MSVC tools to path. See the reference for more information. When you build V from source, use make.bat -msvc to specify that you want to build V using Visual Studio, otherwise it defaults to TCC (which is good for fast compilation).
🌐
Reddit
reddit.com › r/c_programming › a good c compiler for windows ?
r/C_Programming on Reddit: A good C compiler for Windows ?
September 8, 2021 -

I'm looking for a C compiler or compiler suite that is :

  • free, preferably FLOSS.

  • modern : C17, and not just the "required features like MSVC. Say, like supporting <threads.h> and the like.

  • able to target ideally >= XP but >= 7 is crucial.

  • good at generating reasonably efficient (memory, CPU, binary size) code.

  • allows access to Microsoft's POSIX counterparts. Say, like RtlGenRandom or the like.

  • reasonably straightforward to install and set up.

I don't really need an IDE, so if a compiler does not come with one, it doesn't matter; if it does, that's alright.

It'd be nice if the compiler has some static-linking features too.

Those more experienced with developing modern C for/in Windows than me can probably answer this trivially, but I've been searching for hours to little end.

I used to rely on Visual Studio's compiler, but they really only care for C++ and used to barely even support most of C99. Their C11/17 "support" comes in 2021, and is still not fully released yet.

Also, as the post hyperlinked there also mentions :

Windows SDK releases correspond with Windows OS releases. C11 and C17 support requires Windows SDK 10.0.20348.0 (version 2104) or later.

This makes it seem like (correct me if I'm wrong), but C11/17 support for MSVC binaries is limited to the latest Windows 10 . Ugh.

As for MinGW-w64, It seems (correct me if I'm wrong), that Windows' API calls (say, rand_s()) are not possible.

Clang on Windows seems to rely on Visual Studio's linker, kind of like it uses GCC's ld on Linux, and there's little to no information about it.

Top answer
1 of 6
4
Pretty much all Windows compilers these days use stupid online downloaders, eliminating much of the determinism and simplicity you might want (Msys2, Cygwin, MSVC++). Intel's compiler also relies on Microsoft's linker too which is annoying. The only one I found that was a little sane was Embarcadero's (clang based): https://www.embarcadero.com/free-tools/ccompiler/free-download However it is 32-bit only which is possibly an issue for a few projects. So what I typically do is install Msys2, including all that messy POSIX layer nonsense, install the packages: mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-gdb Then zip up the mingw64 folder and delete the rest of the crap. The only annoyance is that GDB drags in sodding python which is extremely heavy for such a niche usage but this is a growing flaw with package managers (and open-source) in general these days. ... Another option which might be preferable is install Linux or FreeBSD and use wine's winegcc compiler to cross compile. I tend to do this and mixed with Wine for quick test iterations is a really nice way to go to avoid Microsoft's slow cancerous consumer growth inside Windows.
2 of 6
3
Clang on Windows seems to rely on Visual Studio's linker, kind of like it uses GCC's ld on Linux, and there's little to no information about it. Clang is a parasite. First time I used it, which was as a sort of 'second opinion', I'd had it for 18 months before I realised it was piggy-backing on top of my gcc installation (headers, linkers etc), even though it was quite a hefty program itself. Then at some point it switched to piggy-backing onto MS tools, where I wasn't able to run it for a few years, because it couldn't sync into my MSVC compiler. Now it does work, but it still needs those MS tools (I've no idea if it's MSBUILD or MSVC tools). The clang binary seems part and parcel of the LLVM binary download (1.6GB), which has 5 linkers of its own, yet it still needs the MS stuff! The latter needs some 2.8GB. So it's a very strange beast. My own preferences are for small, self-contained compilers. There is Tiny C at 1.6MB, which I find an excellent C99 compiler; and my own at 1MB, the latter more limited, but a single executable which contains everything you need to turn .c files into a .exe file.
🌐
Softonic
en.softonic.com › downloads › c-compiler
C Compiler Tools for Fast, Portable Code Builds
September 7, 2026 - ... Compiler/interpreter quality, package manager, and standard library breadth. ... Official docs, tutorials, examples, and beginner-friendliness. Pelles C brings a complete Windows-focused C toolchain, with an optimizing compiler, assembler, linker, and resource tools in one package.
🌐
ThoughtCo
thoughtco.com › list-of-free-c-compilers-958190
What Are Some Free C and C++ Compilers?
May 12, 2025 - Pelles C is a free development kit for Windows and Windows Mobile containing an optimizing C compiler, a macro assembler, a linker, a resource compiler, a message compiler, a make utility and installs builders for both Windows and Windows Mobile.