How to use the gcc compiler

Win7 system to install and use the GCC compiler

This tutorial explains how to install and use the GCC compiler on Win7 Crack system, what is the GCC compiler? Many Linux enthusiasts are familiar with the GCC compiler, for beginners the use of the GCC compiler is still relatively unknown. Many people are directly on the computer to install a virtual machine, so that not only the installation of trouble, but also occupy a lot of computer resources, today I’ll teach you in the Win7 system to install and use the GCC compiler method.

Specific methods are as follows:

1, double-click the GCC installation package, mingw-get-setup.exe, click Install to install;

2, click Change to select the installation path, as far as possible, do not have the Chinese language and spaces;

3, will be under the package of mingw- and mingw32- and msys-. All checked, wait for the download and installation, until the checkboxes all turn earth gray;

4, find the bin directory of the installation directory, right-click the path to copy down;

5, find the computer, right-click, properties. Click Advanced System Settings;

6, find the following environment variables click;

7, in the system variables to find the Path variable, double-click the following input box appears, in the variable value at the end of the bin directory just copied to add the end of the state of the English state of the semicolon (;). Click OK;

8, test whether the installation is successful, in the cmd command prompt, type gcc–help enter key, the following information appears, said the installation is successful;

9, EditPlus3 installation is complete after the interface click on the File under the newC/C++;

10, the following test code appears, save to the specified directory, do not have spaces and Chinese at the end, I saved to E:/My/Test below the test. The file name is test.c;

11, the command prompt window into the E:/MyTest under the dir command to display all the files in the current directory;

12, use the gcc command to compile the command format is as follows gcctest.c – otest enter key to compile the completion;

13, directly run by typing test. Output hello,world. test is complete.

The above tutorial is also the Win7 system to install and use the GCC compiler method, there is a need to use the GCC compiler can come together to understand the tutorial, I hope to help you!

How to compile C program under linux with GCC?

Under Linux, if we want to compile a C source program, we have to use GNU’s gcc compiler, suppose we have the following very simple source program (hello.c):

intmain(intargc,char**argv)

{

printf( “HelloLinux\n”);

}

To compile this program, we just need to execute:

gcc-ohellohello.c

The gcc compiler will generate a hello executable for us. Execute . /hello to see the output of the program

The program

Linux is a free-to-use and freely distributed Unix-like operating system, a multi-user, multi-tasking, multi-threaded and multi-CPU operating system based on POSIX and UNIX. It runs major UNIX utilities, applications and network protocols. It supports both 32-bit and 64-bit hardware.Linux inherits the network-centered design ideas of Unix and is a stable multi-user network operating system.

The Linux operating system was born on October 5, 1991 (which was the first time it was officially announced to the public).There exist many different versions of Linux, but they all use the Linux kernel.Linux can be installed in a wide variety of computer hardware devices, such as cell phones, tablets, routers, video game consoles, desktop computers, mainframes, and supercomputers.