GCC Compiler for Windows

With the acronym GCC are familiar to many people whorelated to the development of software. This compiler is a tool for developers who are committed to free software. Initially, this tool was created for Linux-systems. But there is also a GCC implementation for Windows. It's called MinGW.

History

gcc for windows

Means traditionally used forprograms for open operating systems are GNU tools. The project with this name was created by Richard Stallman in 1984. The need for it was due to the fact that in those days it was difficult to cooperate between program developers. This was due to the fact that the owners of commercial programs arranged many obstacles to such cooperation. The goal of the project was to create a set of software, united by one license, which would not allow someone to assign exclusive rights to such software. Part of this set is the tool for programmers - GCC. For Windows, the analog was created later.

What is a compiler?

It is worth explaining what kind of softwaresecurity. What is it for? In general, the GCC compiler for Windows or Linux is a program that can convert source code written by a programmer into machine code that a computer can understand. There is still such a thing as an "interpreter". Its functions are the same as those of the compiler, but it performs the translation line by line, and not entirely. The program is converted into a bytecode, an intermediate form, which is a binary code. It is then interpreted during execution by a special virtual machine.

Development

gcc compiler for windows

Files containing source codes are created assimple text documents. They can be created using any simple text editor. In addition, you can use special development environments, in which editors are built-in. This tool is KDevelop. This is an environment that contains both an editor and a built-in console, which is located under the editor. The developer gets the opportunity to edit code in one program, and to give console commands without switching between windows.

Before creating a project, you need to create a directory, and in it already - a text document.

Features

gcc arm windows

GCC for Windows MinGW assigns by defaultall executable files that are created, the name is a.out. If you want to give a different name, you need to add the -o flag with the name to the compilation command. This is just one of many flags. In order to see all, you need to type man gcc at the command line. For Windows, the command is the same as for Linux. The help system for the compiler appears before the user. Here you can see what each flag means. To exit the help system, press the Q key.

The work of GCC includes three stages:

  • processing with a preprocessor;
  • compilation;
  • layout.

At the first stage, the contents of the header files, which are specified in the directives at the beginning of the program, are included in the main file.

In the second stage, the text of the program written inprogramming language, turns into a set of machine instructions, and the result is stored in the object file. It is worth noting that on different computers the format of this file may be different. That's why it's more convenient to distribute the programs in the form of source code so that they can be accessed for any architecture. This is what the GCC does. ARM, Windows, Intel, Unix - programs can run everywhere.

At the last stage, all object files are linked into one. The result is the executable file.

Thus, GCC is a convenient tool for developers who are comfortable to use when creating programs.



Related news

GCC Compiler for Windows GCC Compiler for Windows GCC Compiler for Windows GCC Compiler for Windows GCC Compiler for Windows GCC Compiler for Windows