Install under Windows, configure the GCC compiler

Source: Internet
Author: User

to use the GCC compiler under Windows: 1. First introduce the next MinGW

MinGW is a compilation environment that uses only free software to generate pure Win32 executables, which is the Lou of minimalist GNU on Windows.

In fact, MinGW is not a simple C + + compiler, but a set of GNU tools. In addition to GCC, MinGW also contains a number of other GNU program development tools (such as gawk bison, etc.).
The MinGW is developed for people who do not like working on the Linux (FreeBSD) operating system to provide a GNU-compliant working environment for those who stay in Windows.
So, using MinGW, we can use the GNU Program development tool just like under Linux.
GCC is at the heart of MinGW, and GCC is a compilation system that supports a wide range of computer programming languages, and is the closest to standards in implementing language standards. And GCC can be ported to almost all available computer platforms today. (I also have devkitpro on my computer that contains GCC's ARM (for GBA/DS/GP32) and MIPS (for PSP) versions. )
GCC itself does not have an IDE interface like VC (the IDE that supports the MinGW compiler, such as Dev C + +, on Windows). Source code Editor You can choose any text editor you like (it is said that Microsoft's developers, including VC development, do not use VC's IDE editor, but choose the GNU VIM Editor). Then use tools such as make to compile, link, package, or even publish software projects. As with the CVS (SVN) Source version Control tool, anyone in the world can get involved in a software project.


2. Download MinGW

One way is to download a mingw-2.0.0-3.exe to SourceForge (http://sourceforge.net/project/showfiles.php?group_id=2435).

But when I configure it, I have Codeblocks installed on my computer, and I have my own mingw.


3. Configuration of environment variables

In (System Properties--> advanced--> environment variable--> system variable) (the following directories vary according to their computer MinGW location)

A. Add "C:\Program Files\mingwstudio\mingw\bin" to the value of path. This is the path to find the GCC compiler. If there are other content in path, you need to split the semicolon in English state

B. Create a new Library_path variable and add "C:\Program files\mingwstudio\mingw\lib" to its value. This is the path to the standard inventory.

C. Create a new C_include_path variable and add "C:\Program files\mingwstudio\mingw\include" to its value. This is the path to the include lookup header file.


4. Verify that GCC is operating properly

Under the CMD console window, enter Gcc-v. If it has been successfully installed, the version information for GCC will be displayed.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.