OpenMake Meister

Creating Targets for C/C++ with the Eclipse CDT

Meister supports the building of  C/C++ Targets from within the Eclipse IDE.   You can automatically generate your Targets using the Eclipse IDE supporting a synchronized build process between the builds executing inside of the IDE and outside of the IDE. 

 

Building your Eclipse C/C++ objects with Meister requires configuring your C and C++ Eclipse project folders and creating a build project with the correct CDT mappings between your Project Type and the Meister Build Service for your operating system. Table PB-23 shows the default mappings.

 

Developers choosing to use the Eclipse plug-in to generate your Target should first setup the configuration of the Eclipse Target Generator.  Once your configuration has been setup you can then define a Project and Dependency Directory and configure your Eclipse projects to use the Target generation and build features.

 

Note:  To validate that you have the Eclipse Target Generator already installed simply view the list of plug-ins available from the Eclipse IDE.  If the Meister Eclipse Target Generator is installed you will see “OpenMake TGT Generator” in the list.  If it is not in the list, you will need to follow the “Installing and Setting up the Eclipse Target Generation Plug-In” instructions found under the “Setup and Installation” chapter of this guide.

 


Table PB-23  Default Build Service Mappings for Eclipse CDT

Mapping

Operating System

Build Service

Linux Executable

Linux

Executable

Linux CPP Executable

Linux

CPP Executable

Linux Archive Library

Linux

Archive Library

Windows GNU Executable

Windows

GNU Executable

Windows GNU DLL

Windows

GNU Dynamic Link Library

 

To use the supplied build service mappings, you must configure your C and C++ projects as follows.

 

Table PB-24  Eclipse project folders required to use the standard Build Service Mappings

Project Folder

Mapping

<project folder>/src

All C and C++ source files.

<project folder>/lib

All static and dynamic libraries

 

Using the folder structure in PB-24 will allow the default mappings in PB-23 to correctly generate target files.

 

You can copy the libraries into the lib/ folder or create linked resources. The target generator uses the list of files or linked resources in this location to generate a list of libraries required for linking. At build time, the actual libraries used for linking will be determined by the dependency directories so library version can be controlled.

 

In Eclipse, as of release 3.5, there is no graphical way to create a linked resource. The accepted method is to edit the project’s .project file and add a section under the <ProjectDescription> tag such as:

 

      <linkedResources>

                <link>

                           <name>lib/libc.a</name>

                           <type>1</type>

                       <locationURI>file://c:/bin/cygwin/lib/libc.a</locationURI>

                </link>

      </linkedResources>

 

Where the name indicates the location under the Eclipse File System and the locationURI tag value indicates the physical file system location.