Once you installed it, you will see 3 programs appear in your list of programs: Just download the correct installer and launch it with admin rights and you are good to go Installing it is actually a peace of cake
#Free c compiler gcc install
You will be able to install gcc just with one command line like this:Īccording to their website, MSYS2 is a software distribution and building platform for Windows I will present you another way much simplier!įor that I will have to install a software called MSYS2, which is an “easy” way to give some linux feel to your Windows PC and able it to install programs almost as easily as in linux… You can spend several days trying to do that if you are really motivated On Windows, if you want to have gcc (and the other compilers too), you have to download the source code and find a way to compile it…įor that, you will need to install first other software called pre-requisites which will also need to be compiled, etc…
#Free c compiler gcc upgrade
The reason it is easy to install compilers and other kind of open source software on linux is because you have a very powerful command line terminal called bash which handles the installation, uninstallation and upgrade of software using a software called “apt” on debian-based linux systems. Now that you understand how it can be easy to start with writing C code, let’s talk about the difficult part… Just go into the directory where your executable is and run it by writing “helloworld.exe” This will generate an executable binary file called helloworld.exe which can be used to run your code Write the following line of code into your terminal: gcc helloworld.c -o helloworld Once installed on your machine, gcc is just a piece of cake to use to compile a simple c language code Step 1: Write your c codeįor example, let’s take this Hello World example #include
#Free c compiler gcc how to
Now, for large pieces of software, visual studio is probably the way to go 2- How to use the gcc compiler?
I am personally not such a big fan of Visual Studio because of the following reasons: That’s true, and it’s totally fine if you want to use it… If you are on Windows, you probably heard about software such as visual studio from Microsoft which also you to write and compile C and C++ code as well.