This document describes how to use Eclipse project files for the sipx C++ projects, similar to the ones that exist for the Java projects (sipXconfig).

The key to getting builds and output in the proper place (which might be unique for each designer) is some environment settings which should be set in each Eclipse workspace once (see instructions below). You should use a different Eclipse workspace for each branch (same as for the Java projects).

Each sipx component is set up as a project, so that there are project files which allow each to be built and executed/debugged individually. The default configuration runs "make all install" for each project, since the intended usage for this build is during tight development cycles. You can switch to the "check" configuration to do the tests.

Install Eclipse

You will need to get Eclipse (version 3.3.0 at least) (http://www.eclipse.org/downloads/) and the Eclipse CDT (download.eclipse.org/tools/cdt/releases/europa).

Here are the instructions to use these project files:

  1. get the source as usual
  2. configure the source as usual
  3. run "make build" once (optional, but it helps because it creates the output dir)
  4. launch Eclipse. As for the Java projects, you should use a different workspace for each working directory. The workspace should not be in the source tree: choose ~/workspaces/<version> or something similar.

Configure Eclipse

Before using the projects it is important to setup the SIPX_OUT variable as follows:

  1. Select "Preferences" from the "Window" menu. The Preferences window will appear...
  2. Expand the "General" node in the tree view, then the "Workspace" node, and select "Linked Resources".
  3. Add a New variable to map SIPX_OUT to the folder that contains the output for this branch on your system (e.g. ~/WORKING/INSTALL).

You must also setup a variable in the C/C++ Settings to point to the build folder on your system:

  1. Select "Preferences" from the "Window" menu..
  2. Select "C/C++" then "Environment".
  3. Add a New variable to map SIPX_MYBUILD to the folder that contains the build folder for this branch on your system
    (e.g. /home/sipx/WORKING/BUILD) (must be an absolute path, i.e. no ~).

Java variables are set under Java->Build Path->Classpath. Set SIPX_SRC_TOP to point to the top-level source directory, and SIPX_BUILD_TOP to point to your top-level build dir.

You might want to adjust the settings for building, as I found that I prefer to tell Eclipse when to build, rather than it deciding it should on its own:

Import project files

Import the project files (you will get both C++ and Java projects):

  1. Select "Import..." from the "File" menu..
  2. Expand the "General" node in the tree view, then select "Existing Projects into Workspace"
  3. Set the Root Directory to the folder that contains the source on your system (e.g. ~/WORKING/main). Import all projects (do not copy into workspace).

Launch Eclipse

Exit Eclipse and restart it to allow the environment variables to take effect.

Hints on usage: