Changes

Jump to: navigation, search

Basics : Develop Simple Apps Fedora

147 bytes added, 21:19, 18 January 2011
Your First C Program in Eclipse
== Your First C Program in Eclipse ==
[[Image:Screenshot-3.png|left|thumb]]The first thing you have to do is to select the C/C++ perspective. You can do this by clicking the icon pointed to by the red arrow and selecting C/C++.      [[Image:Screenshot-4.png|left|thumb]]Your workbench is now configured for C/C++ development.        [[Image:Screenshot-53.png|left|thumb]]Next select '''File, New, C Project''' from the main menu.        [[Image<br style="clear:Screenshot-7.png|left|thumb]]Enter the name of your project, '''FirstCProject''', and for the executable type select '''Hello World ANSI C Project''', and then click on the '''Finish''' button.      [[Image:Screenshot-8.png|left|thumb]]Notice that you now have a simple Hello World program in the editor window. If you like you may make a small change to the program and save it or you can just leave it as is.      [[Image:Screenshot-9.png|left|thumb]]To execute the program select '''Run As''' from the '''Run''' menu. Then select '''Local C;" /C++ Application'''.        [[Image:Screenshot-10.png|left|thumb]]The output of your program is displayed in the '''Console''' window at the bottom of the workbench.>
Your workbench is now configured for C/C++ development.
[[Image:Screenshot-4.png|left|thumb]]<br style="clear:left;" />
Next select '''File, New, C Project''' from the main menu.
[[Image:Screenshot-5.png|left|thumb]]<br style="clear:left;" />
Enter the name of your project, '''FirstCProject''', and for the executable type select '''Hello World ANSI C Project''', and then click on the '''Finish''' button.
[[Image:Screenshot-7.png|left|thumb]]<br style="clear:left;" />
Notice that you now have a simple Hello World program in the editor window. If you like you may make a small change to the program and save it or you can just leave it as is.
[[Image:Screenshot-8.png|left|thumb]]<br style="clear:left;" />
To execute the program select '''Run As''' from the '''Run''' menu. Then select '''Local C/C++ Application'''.
[[Image:Screenshot-9.png|left|thumb]]<br style="clear:left;" />
The output of your program is displayed in the '''Console''' window at the bottom of the workbench.
[[Image:Screenshot-10.png|left|thumb]]<br style="clear:left;" />
'''Congratulations!''' You've just run your first C program using Eclipse.
63
edits

Navigation menu