Download presentation
Presentation is loading. Please wait.
1
Getting Eclipse for C/C++ Development
Go to and click on Download Eclipse: Select the Eclipse IDE for C/D++ development: Download the distribution: Unzip the distribution in an appropriate location. If you’ve already got Eclipse for Java installed, I recommend placing this in a different directory tree, say eclipsecpp. August 2009 ©2009 McQuain
2
Creating a C Project for Cygwin
Start Eclipse August 2009 ©2009 McQuain
3
Creating a C Project for Cygwin
Start Eclipse and select File/New/C Project: August 2009 ©2009 McQuain
4
Creating a C Project for Cygwin
Enter a name for your Eclipse project… choose a location for it if you like… and select Empty Project. Click on Next… August 2009 ©2009 McQuain
5
Creating a C Project for Cygwin
Click on Advanced settings… August 2009 ©2009 McQuain
6
Configuring the C Project
Expand the C/C++ Build tree, select Settings, and select Cygwin C Compiler… In the Command text box, enter gcc-4 as shown… August 2009 ©2009 McQuain
7
Configuring the C Project
Select Miscellaneous and edit the Other flags box to include –std=c99: Note: in most cases, settings like this require exactitude… do not add or omit spaces. August 2009 ©2009 McQuain
8
Configuring the C Project
Select Cygwin C Linker… in the Command text box, enter gcc-4 as shown… Click OK… and then Finish… August 2009 ©2009 McQuain
9
Adding a C Source File The Eclipse project has been created… now it’s time to add a source file: August 2009 ©2009 McQuain
10
Adding a C Source File Choose a name the source file:
You can leave the Template setting alone, or experiment with it as you like… August 2009 ©2009 McQuain
11
Adding a C Source File Now you’ve got a nearly-empty source file:
August 2009 ©2009 McQuain
12
Editing the Source File
Add the source code as shown below: August 2009 ©2009 McQuain
13
Performing a Build Use the Project menu or click on the build button (the hammer icon): August 2009 ©2009 McQuain
14
Checking the Build Results
Select the Console window and view the results of the build: The given source code was designed to test whether you’ve configured the project properly. If not, the build will fail, since it requires compatibility with the C99 Standard. August 2009 ©2009 McQuain
15
Setting the Run Configuration
Select the Run Configurations option from the Run menu: August 2009 ©2009 McQuain
16
Setting the Run Configuration
Double-click on C/C++ Application… Click Browse for the Project entry and select the current project… Click Search Project for the C/C++ Application entry and select HelloWorld.exe: Click Apply and Close… August 2009 ©2009 McQuain
17
Executing the Program Click the Run button…
Output from printf() appears in the Console window. August 2009 ©2009 McQuain
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.