Eclipse C C++, Emailctchen@pl.csie.ntut.edu.tw or s1669021@ntut.edu.tw, s2598003@ntut.edu.tw http://pl.csie.ntut.edu.tw/~ctchen, http://www.ntut.edu.tw/~s2598003/ 2004/9/10 (0.02 ) Eclipse http://www.eclipse.org Eclipse 3.0Eclipse Windows Linux Eclipse Windows XP Red Hat Linux 9 Linux PDF http://pl.csie.ntut.edu.tw/~ctchen/pdf/eclipseonlinux.pdf http://www.ntut.edu.tw/~s2590008/pdf/installeclipsehowto_0.04.pdf Eclipse Java Java Development Tools, JDT JDK1.3.x Sun JDK JAVA_HOME CLASSPATH Java Eclipse C/C++ plug-ins CDT plug-ins CDT 2 Help Software Updates Find and Install 1 Eclipse Install/Update plug-ins CDT ( http://www.eclipse.org/cdt/ ) 1 Eclipse IBM JDK 2 CDT 1.x(For Eclipse 2.1.x) Eclipse plugins features plug-ins CDT 2.x (For Eclipse 3.0)CDT Eclipse CDT
1 Eclipse Install/Update features(features plug-ins ) features 2 Search for new features to install Next features 2 Install/Update ( features) Update Site plug-ins Remote Site plug-ins Local Site plug-in Archived Site plug-in CDT New Remote Site Name CDTURL http://update.eclipse.org/tools/cdt/releases/new ( http://www.eclipse.org/cdt/ ) 3
Remote Site CDT Remote Site Name URL 3 Install/Update ( Update Site Name URL) Remote Site Sites CDT CDT 2.0.1 4 Next CDT 4 Install/Update ( ) features Select All Next 5
5 Install/Update ( features) 6 CDT CPL license Accept Next 6 Install/Update (License Agreements) Eclipse C:\eclipse Eclipse( Eclipse) Add Site Eclipse Next 7
7 Install/Update ( Eclipse ) features 8 Install 8 Install/Update ( ) Eclipse Eclipse Yes Eclipse 9
9 Eclipse Eclipse plug-ins 1011 12 Help About Eclipse Platform Eclipse features feature Details Eclipse features CDT plug-ins 10 plug-ins( 1)
plug-ins 11 Eclipse ( 2) Eclipse CDT 2.0.1 12 Eclipse features ( 3) Windows C/C++ HelloWorld CDT Linux EclipseC/C++ CDT gccmakegdbgun C/C++ compiler CDT Eclipse C/C++ CDT gcc GUN Windows gcc gcc Windows CDT Windows GUN Cygwin MinGW 3 CDT User FAQ http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/user/faq.html?cvsroot=tools_project
EclipseMinGW Cygwin MinGW MinGW MinGW 3.1.0-1 MinGW-3.1.0-1.exe WinGW C:\MinGW WinGW C:\cygwin\bin PATH Eclipse GUN Tools Windows XP Windows 98/ME autoexec.bat 14 (R) (E) (S) Path (I) C:\cygwin\bin ; 4 Make Make Windows VC nmake Eclipse Eclipse make
DOS gcc gcc: no input files (E)
Path 17 C:\MinGW\bin Path
Eclipse C/C++ Project EclipseCDTMinGW C++ : Hello World Eclipse FileNewProject 19 Managed Make C++ Project Next 20 Name Hello C++ project Next 21 Next 22 Finish NewFile C++ 23 24 File name hello.cpp Finish 7 5 Eclipse Java Eclipse Sun JDK 1.3.x 6 Standard Make C++ Project Make
Hello C++
Finish
hello.cpp #include <iostream> #include <stdlib.h> using namespace std; int main() { cout << "Hello World!\n"; return 0; } Eclipse 25 Run Run RunRun 26 C/C++ Local Configurations Run 27 Hello World
26 Run Configuration
27Hello.exe Linux C/C++ HelloWorld CDT Linux Eclipse plug-in Linux Windows Red Hat Linux 9 Eclipse 3.0SUN JDK 1.3.x CDT 2.0.1 Red Hat Linux 9 gccmakegun tools Windows MinGW Windows C/C++ 1. CDTEclipse JDTJava JDT RefactorRefactoringOrganize ImportsScrapbook Page code templates CDT CDT CDT gccmakegdbfor debugging GUN Tools Eclipse C/C++ WindowsLinux CDTJDT 2. 2.0.1 Eclipse 3.0 JDT Refactor(Refactoring)
Scrapbook Pagecode Templates Wizard Class Makefile Makefile ( Makefile ) [1] CDT home, http://www.eclipse.org/cdt/. [2] CDT user FAQ, http://dev.eclipse.org/viewcvs/index.cgi/~checkout~/cdt-home/user/faq.html?cvsroot= Tools_Project [3] MinGW home, http://www.mingw.org/ [4] cygwin home, http://cygwin.com/ [5] Getting Started with Eclipse and the SWT, http://www.cs.umanitoba.ca/~eclipse/ [6] IBM developerworks, C/C++ development with the Eclipse Platform: How to use the C/C++ Development Toolkit (CDT), Pawel Leszek (pawel.leszek@ipgate.pl), 22 April 2003(http://www-106.ibm.com/developerworks/opensource/library/os-ecc/) 2003/9/18 0.01 2. CDT 2004/9/10 0.02 1. Eclipse 3.0CDT 2.0.1 3. Managed Make C++ Project HelloWorld