Eclipse for C++使用说明

合集下载

Eclipse IDE开发环境使用教程说明书

Eclipse IDE开发环境使用教程说明书

iAbout the T utorialEclipse is an integrated development environment (IDE) for Java and other programming languages like C, C++, PHP, and Ruby etc. Development environment provided by Eclipse includes the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.This tutorial will teach you how to use Eclipse in your day-2-day life while developing any software project using Eclipse IDE. We will give special emphasis on Java project. AudienceThis tutorial has been prepared for beginners to help them understand basic functionality of Eclipse tool. After completing this tutorial, you will find yourself at a moderate level of expertise in using Eclipse IDE from where you can take yourself to next levels. PrerequisitesWe assume you are going to use Eclipse IDE to handle all levels of Java projects development. So it will be good if you have knowledge of software development using any programming language specially Java programming.Copyright & Disclaimer© Copyright 2015 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book can retain a copy for future reference but commercial use of this data is not allowed. Distribution or republishing any content or a part of the content of this e-book in any manner is also not allowed without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or inthistutorial,******************************************iT able of ContentsAbout the Tutorial (i)Audience (i)Prerequisites (i)Copyright & Disclaimer (i)Table of Contents .................................................................................................................................... i i 1.OVERVIEW (1)What is Eclipse? (1)Licensing (1)Eclipse Releases (1)2.INSTALLATION (3)Downloading Eclipse (3)Installing Eclipse (3)Launching Eclipse (4)3.EXPLORE WINDOWS (5)Parts of an Eclipse Window (5)Using Multiple Windows (6)4.EXPLORE MENUS (7)Typical Eclipse Menus (7)Brief Description of Menus (8)Customizing Menus (8)5.EXPLORE VIEWS (9)About Views (9)Organizing Views (9)Moving Views (9)Creating View Folders (10)Opening a view (10)6.PERSPECTIVES (13)What is a Perspective? (13)Opening a Perspective (13)Switching between Perspectives (13)Closing a Perspective (14)Customizing a Perspective (14)7.WORKSPACES (16)About Eclipse Workspace (16)UI Elements for Managing the Workspace (16)8.CREATE JAVA PROJECT (18)Opening the New Java Project wizard (18)Using the New Java Project wizard (18)Viewing the Newly Created Project (20)9.CREATE JAVA PACKAGE (21)Opening the New Java Package wizard (21)Using the New Java Package Wizard (21)Viewing the Newly Created Package (22)10.CREATE JAVA CLASS (23)Opening the New Java Class Wizard (23)Using the New Java Class Wizard (23)Viewing the Newly Created Java class (24)11.CREATE JAVA INTERFACE (25)Opening the New Java Interface Wizard (25)Using the New Java Interface Wizard (25)Viewing the Newly Created Java Interface (26)12.CREATE XML FILE (27)Opening the New XML File wizard (27)Using the New XML File wizard (28)Viewing the Newly Created XML File (29)13.JAVA BUILD PATH (30)Setting the Java Build Path (30)14.RUN CONFIGURATION (31)Creating and Using a Run Configuration (31)15.RUNNING A PROGRAM (33)Running a Java Program (33)16.CREATE JAR FILES (35)Opening the Jar File wizard (35)Using the Jar File wizard (35)17.CLOSE PROJECT (37)Why Close a Project? (37)How to Close a Project? (37)Closed Project in Package Explorer (38)18.REOPEN PROJECT (39)Reopening a Closed Project (39)19.BUILD PROJECT (40)Building a Java Project (40)20.DEBUG CONFIGURATION (42)Creating and Using a Debug Configuration (42)21.DEBUGGING A PROGRAM (44)Debugging a Java Program (44)22.PREFERENCES (48)Setting Preferences (48)23.CONTENT ASSIST (50)Using Content Assist (50)24.QUICK FIX (52)Using Quix Fix (52)25.HOVER HELP (54)Using Hover Help (54)26.SEARCH MENU (56)Searching the Workspace (56)27.NAVIGATION (58)Navigating the Eclipse Workspace (58)Open Type (58)Open Type in Hierarchy (60)Open Resource (61)28.REFACTORING (63)Refactoring using Eclipse (63)29.ADD BOOKMARKS (64)About Bookmarks (64)Adding a Bookmark (64)Opening the Bookmarks View (64)Using the Bookmarks View (65)30.TASK MANAGEMENT (66)Managing Tasks (66)Opening the Tasks View (67)Using the Tasks View (67)31.INSTALL PLUGINS (69)Locating and Installing Plug-ins (69)32.CODE TEMPLATES (73)Using Code Templates (73)Modifying/Adding code templates (74)33.SHORTCUTS (75)About Shortcuts (75)34.RESTART OPTION (78)Restarting Eclipse (78)35.TIPS & TRICKS (79)36.WEB BROWSERS (81)Internal Web Browser (81)Eclipse 7What is Eclipse?In the context of computing, Eclipse is an integrated development environment (IDE) for developing applications using the Java programming language and other programming languages such as C/C++, Python, PERL, Ruby etc.The Eclipse platform which provides the foundation for the Eclipse IDE is composed of plug-ins and is designed to be extensible using additional plug-ins. Developed using Java, the Eclipse platform can be used to develop rich client applications, integrated development environments, and other tools. Eclipse can be used as an IDE for any programming language for which a plug-in is available.The Java Development Tools (JDT) project provides a plug-in that allows Eclipse to be used as a Java IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE, C/C++ Development Tools (CDT) is a plug-in that allows Eclipse to be used for developing application using C/C++, the Eclipse Scala plug-in allows Eclipse to be used an IDE to develop Scala applications and PHPeclipse is a plug-in to eclipse that provides complete development tool for PHP.LicensingEclipse platform and other plug-ins from the Eclipse foundation is released under the Eclipse Public License (EPL). EPL ensures that Eclipse is free to download and install. It also allows Eclipse to be modified and distributed.Eclipse ReleasesEvery year, since 2006, the Eclipse foundation releases the Eclipse Platform and a number of other plug-ins in June.1.Eclipse8Eclipse 9Downloading EclipseYou can download eclipse from /downloads/. The download page lists a number of flavors of eclipse.The capabilities of each packaging of eclipse are different. Java developers typically use Eclipse Classic or Eclipse IDE for developing Java applications.The drop down box in the right corner of the download page allows you to set the operating system on which eclipse is to be installed. You can choose between Windows, Linux and Mac. Eclipse is packaged as a zip file.Installing EclipseTo install on windows, you need a tool that can extract the contents of a zip file. For example you can use:∙7-zip ∙PeaZip ∙ IZArcUsing any one of these tools, extract the contents of the eclipse zip file to any folder of your choice.2.Launching EclipseOn the windows platform, if you extracted the contents of the zip file to c:\, then you can start eclipse by using c:\eclipse\eclipse.exeWhen eclipse starts up for the first time it prompts you for the location of the workspace folder. All your data will be stored in the workspace folder. You can accept the default or choose a new location.1011If you select "Use this as the default and do not ask again", this dialog box will not come up again. You can change this preference using the Workspaces Preference Page. See the Preference tutorialpage for more details.Eclipse 12Parts of an Eclipse WindowThe major visible parts of an eclipse window are:∙Views ∙Editors (all appear in one editor area) ∙Menu Bar ∙ ToolbarAn eclipse perspective is the name given to an initial collection and arrangement of views and an editor area. The default perspective is called java. An eclipse window can have multiple perspectives open in it but only one perspective can be active at any point of time. A user can switch between open perspectives or open a new perspective. A perspective controls what appears in some menus and tool bars.3.EclipseA perspective has only one editor area in which multiple editors can be open. The editor area is usually surrounded by multiple views. In general, editors are used to edit the project data and views are used to view the project metadata. For example, the package explorer shows the java files in the project and the java editor is used to edit a java file.The eclipse window can contain multiple editors and views but only one of them is active at any given point of time. The title bar of the active editor or view looks different from all the others.The UI elements on the menu bar and tool bar represent commands that can be triggered by an end user.Using Multiple WindowsMultiple Eclipse Windows can be open at the same time. To open a new window, click on the Windows menu and select the New Window menu item.Each window can have a different perspective open in them. For example you could open two Eclipse windows one in the Java perspective and the other in the Debug perspective. The window showing the Java perspective can be used for editing the java code and the window showing the debug perspective can be used for debugging the application being developed.13Eclipse 14T ypical Eclipse MenusThe typical menus available on the menu bar of an Eclipse window are:∙File menu ∙Edit menu ∙Navigate menu ∙Search menu ∙Project menu ∙Run menu ∙Window menu ∙ Help menu4.Plug-ins can add new menus and menu items. For example when the java editor is open, you will see the Source menu and when the XML editor is open, you will see the Design menu. Brief Description of Menus15Customizing MenusThe visible menu items on a menu depend on the installed plug-ins and customization done using the Customize Perspective dialog box.16Eclipse 17About ViewsEclipse views allow users to see a graphical representation of project metadata. For example the project navigator view presents a graphical representation of the folders and files associated with a project and properties view presents a graphical representation of an element selected in another view or editor.An eclipse perspective can show any number of views and editors. All editor instances appear in a single editor area, whereas views are placed inside view folders. A workbench window can display any number of view folders. Each view folder can display one or more views. Organizing ViewsThe following picture shows four views arranged in a view folder.The picture given below shows the same four views arranged in two view folders.5.Moving ViewsTo move a view from one view folder to another, just click on the view title and drag to the title bar area of another view folder. The green line shown below is a result of dragging the title bar of the Properties view from one view folder to the title bar area of another view folder. The Properties view can be moved to where the green line is by releasing the mouse button and sending out a drop event.Creating View FoldersView folders can be dynamically created by dragging the title bar of a view to anywhere outside the editor area and title bar of another view folder. As you drag the title bar around, green lines will indicate where exactly the new view folder will be created.Moving the drag icon to the bottom of a window allows you to create a view folder that spans the entire width of the window. Moving the drag icon to the left or right edge of window allows you to create a view folder that spans the entire height of the window.18Opening a viewTo open a view, click on the Window menu and select the Show View menu item.19Clicking on the Other menu item brings up the Show View dialog box that allows you to locate and activate a view.20The views are organized by category. To quickly locate a view, just type the name of a view into the filter text box. To open a view, select it and click on the OK button. The subsequent pages of this tutorial introduce you to a number of useful views.21End of ebook previewIf you liked what you saw…Buy it from our store @ https://22。

Eclipse代码提示功能设置(JavaEclipse+CDTCC++)

Eclipse代码提示功能设置(JavaEclipse+CDTCC++)

Eclipse代码提⽰功能设置(JavaEclipse+CDTCC++)/art/200907/136242.htm最近在Linux下开发,由于长期使⽤Visual Studio 2010,对代码提⽰功能情有独钟,现在在Linux下,使⽤Eclipse做开发,当然免不了怀念Visual Studio强悍的代码提⽰,于是在⽹上搜索了⼀些⽂章,整理出关于Eclipse代码提⽰功能设置的⽅法。

Java:增强Eclipse 的代码提⽰功能,具体怎么样来配置?下⾯开始说步骤:1. 打开Eclipse,然后“window”→“Preferences”2. 选择“java”,展开,“Editor”,选择“Content Assist”。

3. 选择“Content Assist”,然后看到右边,右边的“Auto-Activation”下⾯的“Auto Activation triggers for java”这个选项。

其实就是指触发代码提⽰的就是“.”这个符号。

4. “Auto Activation triggers for java”这个选项,在“.”后加abc字母,⽅便后⾯的查找修改。

然后“apply”,点击“OK”。

5. 然后,“File”→“Export”,在弹出的窗⼝中选择“Perferences”,点击“下⼀步”。

6. 选择导出⽂件路径,本⼈导出到桌⾯,输⼊“test”作为⽂件名,点击“保存”。

7. 在桌⾯找到刚在保存的⽂件“test.epf”,右键选择“⽤记事本打开”。

8. 可以看到很多配置Eclipse的信息9. 按“ctrl + F”快捷键,输⼊“.abc”,点击“查找下⼀个”。

10. 查找到“.abc”的配置信息如下:11. 把“.abc”改成“.abcdefghijklmnopqrstuvwxyz(,”,保存,关闭“test.epf”。

12. 回到Eclipse界⾯,“File”→“Import”,在弹出的窗⼝中选择“Perferences”,点击“下⼀步”,选择刚在已经修改的“test.epf”⽂件,点击“打开”,点击“Finish”。

Mac安装Eclipse

Mac安装Eclipse

Mac安装Eclipse⼀:下载教程前置条件:jdk以安装好第⼀次使⽤mac,装了⼀下午eclipse,终于搞定,特来分享下载eclispe前,请阅读该⽂档:/Eclipse/Installation此⽂档介绍了所有eclipse版本和其所需环境,⼀定要与选择与⾃⼰java版本对应的eclipse,笔者在此⾛了很多弯路,浪费了很多时间,在此希望⼤家注意摘取⽚段,供⼤家参考Eclipse 4.7 (Oxygen)Eclipse 4.7 () was released on June 28, 2017. See .Consider using the Installer. Please see .A Java 8 JRE/JDK is required to run all Oxygen packages based on Eclipse 4.7. The reasoning behind requiring Java 8 are discussed .Eclipse 4.6 (Neon)Eclipse 4.6 () was released on June 22, 2016. See .Consider using the Installer. Please see .A Java 8 JRE/JDK is required to run all Neon packages based on Eclipse 4.6. The reasoning behind requiring Java 8 are discussed .Eclipse 4.5 (Mars)Eclipse 4.5 (Mars) was released on June 24, 2015.Consider using the new Installer! Please see .A Java 7 JRE/JDK is required for all Mars package downloads based on Eclipse 4.5. Information concerning tested configurations for Eclipse 4.5 is provided . Eclipse 4.4 (Luna)Eclipse 4.4 (Luna) was released on June 25, 2014.A Java 7 JRE/JDK is required for most of the Luna package downloads based on Eclipse 4.4. Information concerning tested configurations for Eclipse 4.4 is provided . Eclipse 4.3 (Kepler)Eclipse 4.3 (Kepler) was released in June 2013.A Java 6 JRE/JDK is recommended for Eclipse 4.3. More information concerning tested configurations for Eclipse 4.3 is provided .OK,看完⽂档就可以下载了,我⽤的jdk1.7,因此可以使⽤对应的4.4(Luna)和 4.5(Mars)版本,下载地址如下,当然⼤家可以根据⾃⼰的需要下载所需版本Luna:/downloads/packages/eclipse-ide-java-ee-developers/lunarMars:/downloads/packages/eclipse-ide-java-ee-developers/mars2此处下载的是tar.gz⽂件,要解压之后才能使⽤,不太熟悉mac的同学可以找到下载该⽂件的地⽅,直接使⽤如下命令解压:tar -zxf eclipse-jee-mars-2-macosx-cocoa-x86_64.tar.gz解压完成后会看到eclipse.app,直接双击即可使⽤⼆:安装教程1.安装Eclipse前先确认你的Mac上是否已安装java运⾏环境。

PMD安装和使用说明_CPD

PMD安装和使用说明_CPD

PMD安装和使用说明——for CPD 1简介PMD是一个针对Java语言的静态的代码分析器,它检查Java源文件中的潜在问题,也包含一些编码规范的问题。

另外,Eclipse 的 PMD 插件提供了一项叫做 CPD(或复制粘贴探测器)的功能,用于寻找重复的代码。

为在 Eclipse 中使用这项便利的工具,需要安装具有 PMD 的 Eclipse 插件,该插件具有 CPD 功能。

PMD的官方网站:官方的文档/products.html2安装安装PMD的eclipse插件版,最简单的方法是使用远程站点进行安装和更新。

步骤如下:1.打开Eclipse;2.在菜单中选择Help | Software Updates | Find and Install...3.选择“Search for new features to install”(如果是更新而不是新装,则选择“Search for updates of the currently install features”),点击Next;4.点击New Remote Site...;5.输入Nam e和URL,点击OK按钮;Name:PMDURL: /eclipse6." PMD "将出现在Sites to include in search页面中,选中PMD,点击Finish;7.In the Search Results页面,选中PMD,点击Next。

8.选中“I Accept the terms of the license agreements”,点击Next;9.确认安装路径正确,点击Finish;10.等待Eclipse下载需要的jar文件包,点击Install;11.根据提示,选择Yes重启Eclipse。

3CPD使用方法1.选中你的Java项目,右键=>PMD=>子菜单项里有“Find Suspect Cut And Paste”一项,如下图所示:2.点中“Find Suspect Cut And Paste”,出现如下对话框。

Ubuntu_下使用Eclipse_CDT开发C、C++简易教程

Ubuntu_下使用Eclipse_CDT开发C、C++简易教程
Ubuntu 下使用 Eclipse CDT 开发 C、C++简易教程
一、预备工作 1.安装 Java 开发环境(Eclipse CDT 运行必须环境):
sudo apt-get install sun-java6-jdk sudo apt-get install sun-java6-jre
2.安装 C++开发环境 sudo apt-get install g++
由于本工程无命令行参数,所以不需要进行任何设置,点击Close按钮即可。 (3)Debug 点击菜单Run->Debug或使用快捷键F11进行调试,调试过程中使用快捷键F5进行逐步
调试。
结尾语
由于时间仓促,只完成了C语言篇,C++篇类似。如读者需要最新版本,请发E-mail至笔 者gmail:yyhoo2.young@
(3)编写 main.c
点击菜单File->New->Source File新建一个头文件main.c,其内容如下所示:
/* * main.c *
* Created on: 20: young
*/
#include "hello.h"
int main() {
say_hello();
3.下载 Eclipse CDT 进入 Eclipse 官方主页下载页面 /downloads/,找到如下图所 示 Eclipse ID for C/C++ Developers:
选择 Linux 32bit(如果读者安装的是 64bit 的 Ubuntu,请选择后者),进行下载。
当然程序不是一编写完毕,就可以通过编译的,需要调试。
(1)设置断点 选中main.c页面,将鼠标放在该页面的左边框上,点击鼠标右键,弹出菜单,选择 Toggle Breakpoint选项,如下图所示:

JDK环境配置和eclipse的基本使用教程(包括调试)

JDK环境配置和eclipse的基本使用教程(包括调试)

第一次实验报告/**@Author:李日中@Data:2012-9-8*/操作系统:Windows XPJDK版本:jdk-7u6-windows-i586.exe集成开发环境(IDE):eclipse-SDK-4.2-win32JDK下载网址:/technetwork/java/javase/downloads/index.html Eclipse下载网址:/downloads/(选择Eclipse Classic 4.2)DOS(字符界面)编程的环境变量配置:1、右击我的电脑——选择属性——选择高级——点击环境变量;2、在Administrator的用户环境变量中(1)新建path(不区分大小写),输入.;D:\Java\jdk1.7.0_06;D:\Java\jdk1.7.0_06\bin;D:\Java\jre7\bin;如图:(2)新建classpath(不区分大小写),输入.;D:\Java\jdk1.7.0_06\lib\dt.jar;D:\Java\jdk1.7.0_06\lib\tools.jar如图:(3)新建java_home,输入.;D:\Java\jdk1.7.0_06;如图:说明:1、(3)步骤不是必须的,因为(1)(2)步骤中我采取了绝对路径;2、变量的命名是不区分大小写的;3、配置完环境变量后,有的机器需要重新启动,看情况。

3、DOS界面的编程(1)基础知识1、dos界面下,是不区分大小写,但区分中英文符号,路径可以是中文,也可以是英文,不过建议全英文,因为dos的debug状态下,中文可能会乱码;2、目录切换的基本命令如:输入cmd,Enter 后输入D:如图:Enter后的结果,如图:再输入cd D:\JA V A培训\javaDOS (注意cd后有空格),Enter后的结果,如图:(2)DOS界面下建立、编译、翻译执行JA V A Application,1、如:在D:\JA V A培训\javaDOS目录下,新建一个文本文件,重命名为InnerClass.java注意去掉“隐藏已知文件类型的拓展名”前面的钩,如图:3、使用UltraEdit打开该文件,输入代码如下:class Outer{private int num = 100;//内置类可以访问private的,public,protected肯定可以class Inner //定义内置类{private int num = 90;void output(){int num = 80;System.out.println(num);//局部变量System.out.println(this.num);//内置类私有成员System.out.println(Outer.this.num);//引用外部类中的私有成员}}class InnerForTest{}class InnerTest{}void output(){Inner inner = new Inner();inner.output();//外部类成员函数调用内部类成员函数}Inner GetInner(){return new Inner();}}class InnerClass{public static void main(String[] args){Outer outer = new Outer();outer.output();//outer.output().inner.output(); //能使用在外部类一个成员函数中已经定义好的内置类对象?}}然后保存,在dos界面下,输入javac InnerClass.java,按下回车键,如图所示:你会发现,什么也没输出,这就对了。

Ecilpse搭建C语言开发环境

Ecilpse搭建C语言开发环境

Eclipse搭建C语言开发环境Eclipse进行C/C++开发—Eclipse+CDT+MinGW的配置与使用详解1.简介Eclipse作为目前如日中天的开放式IDE,由于有大量插件支持,所以几乎无所不能,除了Java开发的老本行之外,C/C++开发也不在话下。

下面就给大家介绍如何使用CDT(C/C++ Development Tools)进行C/C++开发。

本文适合有一定Eclipse使用经验的读者,如果您对Eclipse的基本操作还很陌生,请先在网上搜索相关教程进行学习。

2.相关软件的下载准备2.1 下载Eclipse SDK +CDT安装和配置请先从下载的Eclipse SDK,目前的最新版本是3.3.1,然后从下载与Eclipse版本相配套的CDT2.2 下载Eclipse IDE for C/C++直接下载打包好的,这个版本包含了最新版本的eclipse IDE的核心和与之配套的CDT,免去了安装CDT的麻烦。

2.3下载安装JDK为了能够正常运行Eclipse,请确保你的计算机上装有JDK,并且已经配置好了环境变量。

2.4下载C/C++编译器由于CDT中并不自带编译器,所以还需要安装一个C/C++的编译器,这里给大家推荐的是MinGW,下载地址为,以下将使用MinGW-3.1.0-1进行讲解。

3.软件的安装3.1Eclipse SDK +CDT的安装以上软件凑齐之后,便可以进行安装配置了。

首先,解压Eclipse SDK的安装程序即可完成Eclipse的安装,这里假设将其解压到C:\路径下,则C:\下会出现一个名为“eclipse”的文件夹。

接着,将CDT的安装文件同样解压到C:\路径下,由于其解压后同样是名为“eclipse”的文件夹,所以会插入或覆盖相应的文件,解压完成后,CDT的安装工作便完成了。

3.2 Eclipse IDE for C/C++的安装这是一个压缩包,直接解压就可以,这里面包含了CDT.3.3C/C++编译器MinGW的安装安装MinGW,假设安装到C:\MinGW目录下。

XP系统下Cygwin + CDT + eclipse搭建c,cpp环境

XP系统下Cygwin + CDT + eclipse搭建c,cpp环境

在XP系统下Cygwin + CDT + eclipse搭建c/cpp开发环境2012-12-14 smart_2CDT是在eclipse中编写C++程序的插件,虽然还不是很完美,不过是在windows中编写linux下C++程序的一个好途径。

下面就介绍下如何用Cygwin、CDT、eclipse来搭建c/cpp开发环境搭。

1. 安装Cygwin到Cygwin的官方网站下载Cygwin的安装程序setup.exe,地址是:/或者直接使用下载连接来下载安装程序,下载连接是:/setup.exe下载完成后,运行setup.exe程序安装Cygwin。

安装时在组件列表中的“Devel”分支下选择以下组件:binutils,gcc,gcc-core,gcc-g++,gcc-mingw-core,gcc-mingw-g++,gdb,make.安装完成后,需要在windows的环境变量中加上PATH=$cygwin/bin的路径,其中 $cygwin用实际安装目录替换掉。

通常安装完成后,在windows cmd中直接运行g++, gcc, 可能会显示“访问被拒绝” (access denied),表明安装还未彻底完成。

此时,进入cygwin安装目录/bin下检查g++.exe, gcc.exe是否只有1k,如果是,那么文件是符号链接,那么把这两个分别文件重命名一下(备份)。

然后把g++-3.exe(或者g++-4.exe)和gcc-3.exe 各copy一份到别处,分别重命名为g++.exe和gcc.exe,然后再将这两个文件copy回来,放到cygwin安装目录/bin下面。

完成后,开个cmd命令行窗口,分别试一下gcc -v , make -v 命令。

提示信息正确即表明Cygwin 正确安装完成。

注意:不可以不删除或重命名cygwin安装目录/bin下原有的文件g++.exe, gcc.exe,而仅仅是直接copy用修改文件名得到的g++.exe, gcc.exe去覆盖,只是覆盖,无法解决问题。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Eclipse(for C++)使用说明
1、启动eclipse,在命令行中输入eclipse,出现窗口,如下图所示:
2、添加工程
在file菜单中选择import,出现窗口如下:
3、在General下选择Existing Projects into Workspace,单击next,出现如下窗口:
4、点击Browse,选择工程位置,出现下图所示
5、单击Finish,工作区如下图所示:
6、修改build选项,有两种方法
方法一:在项目名称上单击右键,选择Properties
方法二:选中项目,在菜单栏,选择Project/Properties
出现下图:
在左边选择C/C++ Build,修改Build directory:选择File system,选择makefile所在的文件夹,点击OK
7、在菜单栏选择Project/Build All,整个项目开始编译,如下图所示:
8、Run,在菜单栏选择Run/Run Configurations,出现窗口如下:
选择Arguments,点击File System,然后选择可执行文件所在目录,点击Apply,Close
然后在工具栏点击,程序即可运行
9、Debug
在Project explorer中,选择可执行文件,然后在菜单栏选择Run/Debug As,出现如下对话框,或者在工具栏点击图标,配置如下图:
点击OK,会弹出如下窗口:
选择Yes,整个工作区将切换到debug模式,如下图所示:
10、切换工作区视图
11、其他
A、查看函数的定义,按下CTRL键后,将鼠标移动到函数名称上左键单击,即可跳转
到函数的定义处。

B、如果想返回到上一视图,在工具栏点击
C、将鼠标移动到函数定义处,然后按下F2键,即可在浮出的窗口中查看该函数的代码
D、在左边Project explore中双击文件,即可在工作区中打开该文件进行编辑
12、在Eclipse中使用CVS
在项目名上单击鼠标右键,在弹出的菜单中选择Team,会出现相关选项。

相关文档
最新文档