first, the environment preparationWindows
second, the GCC compiler in Windows environment
1.MinGW IntroductionMinGW is a compilation environment that uses only free software to generate pure Win32 executables, which are minimalist GNU on Windows merchants.
In fact, MinGW is not a simple C + + compiler, but a set of GNU tools. In addition to GCC, MinGW also contains some other GNU program development tools (such as gawk bison, etc.).
The MinGW was developed to provide a GNU-compliant GNU working environment for those who do not like to work on the Linux (FreeBSD) operating system and remain in Windows.
So, using MinGW, we can use the GNU Program development tool just like under Linux.
GCC is the core of MinGW, and GCC is a set of compiler systems that support a wide range of computer programming languages, and are closest to the standard in the implementation of language standards. And GCC can be ported to almost all available computer platforms today. (My computer is also equipped with Devkitpro, which 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 + +, is also available on Windows). Source code editing You can choose any text editor you like (it is said that Microsoft developers, including VC development are not using the VC IDE Editor, but the GNU VIM editor). Then use tools such as make to compile, link, package, and even publish software projects. And like the CVS (SVN) Source version Control tool, people in any corner of the world can get involved in a software project.
2.MinGW
32-bit version:Http://sourceforge.net/projects/mingw/?source=typ_redirect
64-bit version:Http://sourceforge.net/projects/mingw-w64/?source=directory
3. Configuration of environment variables Computer--> System Properties--Advanced system settings--environment variables--System variables
- Create a new mingw_home variable, in which the F:\MinGW directory is changed according to the location of your computer MINGW;
- NewLibrary_path variables,in which to join%mingw_home%\lib standard inventory placing path;
- NewC_include_path variables,in which to join%mingw_home%\include header file path;
- in the value of path, add %mingw_home%\bin This is the path to find the GCC compiler. If there are other contents in path, it is necessary to split the semicolon in English state;
4. Install the Update standard librarySelect a standard library to install
ExecutioncontentUpdate
5. Verify that GCC is running correctly Under the console window, enter Gcc-v, and the result is similar, and the installation succeeds.
iii. Eclipse Installation Configuration
1.Eclipse Introduction Eclipse was originally developed by IBM as an alternative business software for the next Generation IDE development environment of Visual age for Java, which was contributed to the open source community in November 2001 and is now made up of the non-profit software vendor Alliance Eclipse Foundation (eclipse Foundation) management. Eclipse itself is a framework platform, but the support of many plugins makes eclipse more flexible, so many software developers develop their own Ides with Eclipse as their framework.
need to use this timeEclipse IDE for C + + developers.
2.Eclipse Http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/marsr
3. compile times wrong program ' make ' not found in PATH
After checking the C:\MinGW\bin is indeed no make.exe, there are Mingw32-make.exe,
put Mingw32-make.exe Backup, change to Make.exe after changing the name, you can compile, run;
But there is a mistake, can not find mingwg++, the mingw32-g++.exe backup, changed to mingwg++;
Problem Solving!
From for notes (Wiz)
C Language Study first day ~eclipse MINGW environment construction