This article provides a way to build a C/D + + development platform with ECLIPSE+CDT+MINGW under Windows, and test the platform for Windows XP Sp2 CHS. The following software is available under the Windows platform version. 1, install the JDK, the purpose is to run eclipse. The current version is Jdk-1_5_0_06-windows-i586-p.exe, http://java.sun.com/javase/downloads/index.jsp. Install only the JDK. Assume that the installation path is D:\java\JDK. Configure the System environment variable (right-click My Computer, Properties--Advanced, environment variable, system variable) path=d:\java\jdk\bin. At this point, you can compile and run the Java program in the command line state. 2, install Eclipse, the current version eclipse-sdk-3.2-win32.zip,http://www.eclipse.org/downloads/. Unzip to the specified folder. Assume that the installation path is D:\Eclipse. At this point, Eclipse is in English and can be used to develop Java programs. 3, install Eclipse Multi-Country language Pack, current version nlpack1-eclipse-sdk-3.2-win32.zip,http://www.eclipse.org/downloads/. After extracting to a directory, you can install 1 in one of the following two ways) to copy the \features and \plugins folders in the extracted folder to the Eclipse installation path, with a file overlay prompt, Click OK.     2) Create a new folder under the Eclipse installation path, such as \language, to copy the \eclipse folder in the extracted folder to \language. Build the \links folder under the Eclipse installation path, create a text file, and name *.reg, such as Links.start, to write Path=d:\\eclipse\\language. with one of these methods, eclipse will become the Chinese version. 4. Installing the CDT (Eclipse's IDE in C/C + +), current version org.eclipse.cdt-3.1.0-win32.x86.zip,http://www.eclipse.org/cdt/downloads. php. Take the same installation method as the 3rd, recommend the 2nd) method, after the establishment of the folder \CDT, simply add the original Links.start file in the new line PATH=D:\\ECLIPSE\\CDT can be. This method is easy to add and delete and manage. In this case, you can see projects in C and C + + in the new (project), the Eclipse file (files), but you cannot compile a C + + program at this time. 5, install the MinGW (c + + compiler), the current version mingw-5.0.2.exe,http://www.mingw.org/download.shtml. You can download the *.exe and install it via the network (Install option, select g++ and make). can also be manually installed, first download the corresponding item, and extract to the same directory, download file for binutils-2.15.91-20040904-1.tar.gz,gcc-core-3.4.2-20040916-1.tar.gz,gcc-g++- 3.4.2-20040916-1.tar.gz,mingw32-make-3.80.0-3.tar.gz,mingw-runtime-3.9.tar.gz,w32api-3.6.tar.gz. It is recommended to use the first method, the comparison of the fool. Assume that the installation directory is D:\\MINGW. Configure MinGW, create a text file, and name *.reg, such as Path.reg, to write the following contents of Windows Registry Editor Version 5.00[hkey_local_ Machine\system\controlset001\control\session Manager\Environment]
"PATH" = "d:\\mingw\\bin;%path%"
"Library_path" = "D:\\mingw\\lib"
"C_include_path" = "D:\\mingw\\include"
"Cplus_include_path" = "d:\\mingw\\include\\c++\\3.4.2;d:\\mingw\\include\\c++\\3.4.2\\mingw32;d:\\mingw\\ Include\\c++\\3.4.2\\backward;d:\\mingw\\include "After saving, and double-click Run, then in the system environment variable configuration, click OK. Of course, the corresponding system environment variables can also be modified directly. Rename the file Mingw32-make.exe under D:\MinGW\bin to Make.exe. At this point, MinGW, to configure, on the Windows command line, enter g++, and return, you will be prompted g++: no input files, the configuration is successful, you can compile the C + + program from the command line. Another kind of mingw similar software is called C.Gywin, but MinGW is the open source software, recommended to use. 6, the development process. Open Eclipse, in the new project, you can see the two options for managed make C + + project (managed custom C + + projects) and standard make C + + project (Standardized custom C + + projects). Open window, preferences, c/c++->new make Project->binary Parser, remove elf Parser, select PE Windows Parser (because you want to run the developed program under Windows). In project selection, Managed make C + + project does not need to manually write the makefile file, the writing process is done by the IDE, similar to the use of Microsoft Visual C + + or Borland C + + Builder style, so that developers focus on C Programming for + +. Standard make C + + project requires manual writing of makefile, similar to the process of developing C + + programs under UNIX or Linux, especially for large-scale programming. Now that the configuration process is complete, here's a small example of using eclipse to develop managed make C + + project. 7, routine. (file), new (project), create a new managed make C + + project, which is named demo. In the view C + + projects, right-click the project name, New->source File, named Demo.cpp. Write the following: #include <iostream>
#include <string>
using namespace Std;
int main () {string str= "Hello, World"; cout<<str; return 1;} To save space, cut to one line, click on the project name, remove the project--Auto-build, click Build Project. Will prompt ' finished building target:T5.exe ' Build Comp