Eclipse - an Integrated Development environment

Getting Started

Most Linux distributions come with Eclipse as an installable package. I don't recommend using them. Instead download Eclipse from the Eclipse website. You will want to get the version that is called "Eclipse for C/C++ Developers". As it is Java, you just need to unpack the files and run the executable. Make sure you are running the Sun Java runtime, preferably the latest version - Eclipse does not run very well on gcj. Sun's Java is fully free nowadays anyway so you shouldn't have any problems finding out how to run it on your distribution. If you already have a version of Eclipse, you just need to install the CDT which you can find through the Help | Eclipse Marketplace menu item.

Start Eclipse and select a workspace. A workspace is a directory where your source code goes, but for using with an existing RAVL directory, you will probably just leave the worksapce as an empty directory and put your source code elsewhere. DO NOT delete the workspace though, Eclipse stores all your settings in hidden files in the directory.

Want to create a short-cut to run eclipse? You will probably need to create a shortcut to run eclipse through tcsh to pick up all the RAVL variables. The easiest way to do this is to drag the RAVL file to your panel to create a shortcut, and then when asked change the command from /blah/blah/blah/eclipse to tcsh -c /blah/blah/blah/eclipse

Once you have started Eclipse, go to Window | Preferences and then navigate on the left hand side of the window down to C/C++ | Build | Environment. Click Add... and create a new variable with the name QMAKE_INFO and value 1.

Now you are ready to go! Create a new project - the project type is C++ -> Makefile Project with Existing Code. Type in the name of the project, browse to the location of the source code and select <none> as the build chain type

Finally set up the default build configuration. Right-click on the new project, select Properties and navigate to C/C++ Build. Un-select Use default build command and type in qm as the build command. Now click on the Behaviour tab and type in the build targets you want to use to build and to clean (for example optshared and optclean)

You can now create new files and press Ctrl-B to build them!

Autocomplete etc. will not work untill you have built the project at least once. (And it actually needs to build stuff - select a file, hit space and then backspace and then save the file to force a re-build).

You can add new build configurations to build in debug etc. using the Manage Configurations button at the top of the C/C++Build page of the project settings.

You can create Make Targets in the Make Targets window on the right of the workspace. This will allow you to build subdirectories (by placing a make target in a subdirectory) or to create special builds (for building documentation etc.)

Useful Keys

How do I...?

SVN Integration

There are two SVN plugins that can be used with Eclipse. They can be found in the Eclipse Marketplace by searching for svn. Further instructions can be found via google!


Joe Kilner
Last modified: Wed Feb 16 10:57:36 GMT 2011