Building a C language development environment

I will explain how to build a C language development environment. Once you can use the gcc command, you will be able to compile and run C language. The gcc command is a method of compiling C language on UNIX / Linux, but now (written on June 21, 2021), it can be ported to Mac and Windows. I've seen other sites for beginners say that building a C language development environment is difficult, but I think it's easy.

Building a development environment for C language development environment on Windows

For Windows, "How to use MinGW" " How to use msys2" "Use WSL2 to create a Linux environment" How to make it "and so on.

MinGW

MinGW can be downloaded and installed individually, but it comes with Strawberry Perl, so Strawberry One way is to try installing Perl. This is the easiest.

msys2

How to use msys2, once the procedure for building the Perl development environment is completed, C language development will occur naturally. The environmental procedure is complete.

WSL2

I think that installing Ubuntu is a natural way to use WSL2, so after installing WSL2, C language / C ++ development environment construction on Ubuntu.

Construction of development environment for C language development environment on Mac

On Mac, you can use the gcc command by installing the Command line tools for Xcode. The Mac gcc command is a wrapper for clang.

Building a C language development environment on UNIX / Linux

Let's build a C language development environment with Unix / Linux.

You can install gcc using the commands (yum and apt) that install the packages provided by your distribution.

If you are in the C language development environment on Ubuntu, you can refer to the following contents.

A sample installation of gcc on Ubuntu.

sudo apt install -y gcc

Install packages provided by the distribution in other Unix / Linux environments such as Debian, CentOS, FreeBSD, etc. You can do the same with commands (yum and apt).

Associated Information