Eclipse is an IDE (Integrated Development Environment: Integrated Development Environment) built at once very simple and very powerful. Originally, it was an IBM project
then passed under open-source license. It is a Java application based rather oriented development in Java. But his great strength and accept plug-ins to suit all languages
and all situations. It may particularly be used for C development tools dedicated to programming in C / C + +. Associated couple pilrc / PRC-Tools, Eclipse allows to build a fully functional development environment, easy to use and to totally free!
Eclipse Installation
- Make sure you have C compilers.
- Download the software for the Eclipse C / C + +. Unzip the downloaded file.
- Enter the directory generally called the eclipse) and open the file
- Choose the configuration options by default
- Go to the File menu > New Project C. Save it.
- Go to the File menu and choose New Source File
- Choose the source file name that ends up under C and use the Empty as a template. Being your first program
For MAC
Steps :
- First install Eclipse. Once Eclipse is installed by simply dragging and dropping from the archive, you have to download the plug-in C in order to benefit including an editor tailored to the C language syntax, various search functions, completion and Semi-automatic indexing. This happens directly from the extension manager of Eclipse:
- Open the application and select the menu Help / Software Update / Find And Install.
- In the wizard that opens, click Search for new features to install.
- Then enter the site where to download the plug-in.
- Check to include sites in CDT in search then Next
- In search results, then select the pug-in: Eclipse C / C + + - Development Tools
- The next screen shows the license. Once validated, you go to the last screen that lets you choose the destination application. Leave Eclipse by default, click Finish and the download starts.
- At the end of the download, restart Eclipse to save the plug-in and that's it. You are ready to use the environment to develop your programs.
Language Support
You can locate the interface and help files of Eclipse in different lanaguage. Indeed, IBM continues to use Eclipse and adapt for its own needs. In this context, they developed language packs they also donated to the Open Source community. You can download the file and then simply copy the contents of those records in those of the same name of your Eclipse folder, restart and that's all.
Pilrc and PRC-Tools
If you feel the courage and ability, you can download sources and compile yourself. For PRC-Tools and pilrc are on sourceforge. Here, there is nothing to compile the necessary libraries but impossible to compile any program. You can also download a package that already includes everything you need. SDK pilrc, PRC-Tools: everything is already compiled and included with the installer, the development poses no concern. For information: The SDK files are installed in a hidden directory: / opt / palmdev and all binaries are found in usr / local / bin.
Creating and managing projects
By clicking on File / New / Project appears a list with predefined project templates, dependent plug-ins and options installed on Eclipse. Including shots show two models made by the plug-in "C Development Tools: Managed Make C / C + + Make Project and Standard C / C + + Project. For Standard Make Project, it is you who create the Makefile, so that with a project managed, it automatically generates the Eclipse. Unfortunately, these two models are well suited for developing programs for desktop platform. For what interests us, we will thus create a Simple Project.
On the next screen, you choose the name of your project and its location. You can create in the workspace default Eclipse or any other path you specify. If you specify the path to a folder is not empty, the files will be automatically picked up by Eclipse. Click Finish to generate your new project. At any time, you can import other files into your project via File / Import. Similarly, you can open other files not belonging to a project using File / Open External File.
You can choose the appropriate perspective to your project in the menu Window / Open Perspective, which contain particular C / C + + for a project in C. If the basic options do not suit you, you can also customize the view via Window / Customize Intentions. You can finally put in the foreground the view that interests you via Window / Show. In view C / C + +, the publisher is in the middle of the screen. It automatically provides syntax highlighting and code completion: Type the first letters then press "command - space" and the editor automatically offers a list of matching models. You can edit this list in the preferences of Eclipse via Window / Preferences.
As for C code, the editor of Makefiles also offers syntax highlighting. To help you, you also have the right to an Outline. It displays a dynamic tree structure consisting of key elements of the file: functions, variables, targets, rules, etc. For faster navigation, click in the Outline view displays the corresponding line directly in the editor
Compilation
This step is actually very simple because a classic run by Makefile. Except that as we have seen above, Eclipse has its own Makefile editor and most importantly, the process can be started directly from Ecplise. No need to run any commands from the terminal. You still need to know Eclipse does not recognize the same path as the system shell. In other words, it will indicate the full path of the utilities that are brought out in the Makefile (/ usr / local / bin, as previously reported).
Makefile must also include a rule whereby all Eclipse will rebuild the entire project. These two points taken into account, just as the project file has a Makefile. Menu Project / Build All command make all the launches and Project / Clean launches a make clean. The results are displayed on the console of Eclipse.
Bookmarks