In addition to developing Java, Eclipse has supported many languages. Now introduce the development environment settings of C, C , and will have the opportunity to introduce other. Enjoy it! OS: Windows XP Professional SP1 User Versions: Eclipse 2.1.2 One. First To download CDT, Eclipse 2.1.2 users, please download this: CDT 1.2.0 Ga - Full - Windows. Eclipse 2.1.3 Users please download: CDT 1.2.1. Eclipse 3.0 M7 users please download: CDT 2.0 m7. Eclipse 3.0 M8 User Please download: CDT 2.0 M8. Eclipse 3.0 M9 users please download: CDT 2.0 m9. Download URL: http://www.eclipse.org/CDT/ Installation: Reproducts Eclipse to the Eclipse installation data to re-open the Eclipse to the Eclipse installation data. Downloading the GNU C, C compiler that can be used on Windows, here to download: mingw. Download a long string, please select this version: mingw bin mingw-3.1.0-1.exe 14863 KB Sep 15, 2003 11:14 Download URL: http://www.mingw.org/download.shtml Installation : Install the directory option C slot, then the next step (Next) is OK. The post-installation path is like this -> c: / mingw. I. First test compilation and execution in Command Line mode. Create the MINGW32-Make.exe under C: / MingW / BIN, because it will preset this file name instead of MINGW32-Make when using the Eclipse. (Note: If you do not rename or have other Make programs, you can also add a Targets View where you will add a TARGETS VIEW. When you add a TASK, build command cancels Use DEFAULT, use MingW32-Make) - Supplement by snpshu. And Project Properties-> make Project -> Change Make to MINGW32-MAKE Add: PATH: C: / MingW / BIN; (If the system already has other C / C compiler, please C: / mingw / bin is added to the front.) Library_path: c: / mingw / libc_include_path: c: / mingw / incrudecplus_include_path: c: / mingw / include / c / 3.2.3; C: / MingW / Include / C / 3.2.3 / mingw32; c: / mingw / include / c / 3.2.3 / backward; c: / mingw / incrude first using the text editor to write the original file, geot name: main.cpp.
#include using namespace std; int main (void) {cout << "CAN you feel my world?"; return 0;} Compiling instructions under Command Line: C: / g main.cpp -O3 -O Hello (O3 O is the English capital "Europe") After successful compilation: will generate Hello.exe execution files. The execution screen is as follows: Microsoft Windows XP [version 5.1.2600] (c) Copyright 1985-2001 Microsoft Corp.c: / Documents and Settings / Sungo> CD / C: /> G main.cpp -o3 -o helloc: /> HELLOCAN you feel my world? C: /> Note: -O3 flag indicates the highest level compilation optimization, the slower compilation speed is the slowest, but the execution file file will be minimum, the execution speed will be the fastest; the -o flag indicates the compiled *. EXE renamed. ◎ Step. After opening Eclipse, first turn on the C / C dedicated view. Windows-> Open perspective-> C / C development ◎ Step II. Create a project for C . File-new-> Project-> C -> Standard Make C Project (Next steps, like the general Java project, all of which can be presented) ◎ Step 3. MAIN.CPP IMPORT we just wrote, Add it in the project. File-> import-> file system-> Browse C: /main.cpp ◎ Step 4. Create a Makefile. File-> new-> file, file name fill in: Makefile. (Do not screamed) Makefile contents are as follows: All: g main.cpp -g -o run Note: Makefile Randide To make the rule with a Tab key, it is not possible to have a problem with space 4. ◎ Step 5. Set the Make Targets. Windows-show view-> make targets Right-click on the Make Targets window, add build target, name: Compilation. Build Target hits: ALL. ◎ Step six. Compile. At the Make Targets "Compilation", you will start compiling, and we can find that hello.exe has been generated under our project. The following output results can be seen under the bottom C-Build window: make -k all g main.cpp -g -o run