Eclipse C: The Eclipse Libraries


Description

The Eclipse libraries contain every utility available in the Eclipse top-level application. Programs written in C and other C-compatible languages can be linked to these libraries to use the utilities directly.

Each utility follows the naming convention. For example:

See "C Identifier Naming Convention" for more details.

Run Time and Development Libraries

There are two Eclipse library units which, taken, together, provide a complete Common Lisp implementation:

  1. The run time library provides the definitions needed at run time by the vast majority of Lisp applications. It contains everything not defined as being part of the development library, and is all that is usually required for run time applications.

  2. The development library contains features typically used to develop programs or to provide the traditional features of a dynamic application such as the Lisp top-level. This includes:

A typical interactive programming application, such as the Eclipse top-level itself, needs to use (eg. be linked with) both the run time and the the development libraries. However, most applications need only use the run time library. All Eclipse applications must use at least some parts of the run time library.

In addition to defining Lisp functions and symbols, the run time library and its header file (eclipse.h) define facilitites for using Lisp constructs such as closures and unwind-protect, converting between Lisp and C data, and memory management. See "Implementation of Lisp" for more information.

It is not unspecified whether development library symbols, functions, etc., are present, interned, bound, fbound, etc., in the run time library. In fact, many utilities which have full definitions provided only by the development library may have dummy definitions in the run time library.

Library Modules and Initialization

Throughout the Eclipse documentation, we loosely use the term library to refer to a coordinated collection of utility definitions which can be used by programs written in various languages. The precise format of these libraries is defined in the next section (Library Format).

Each library defines a system initialization function that must be called by application code before any utilities from the library may be used:

  • clInit initializes the run time library.
  • clInitD initializes the development library.

    Regardless of format, a library may be made up of a number of smaller pieces. Depending on the needs of an application, it may not be necessary to use all the utilities defined within a library. We use the term module to refer to a component of a library which defines some subset of utilities within the library.

    No facilities are defined at this time to initialize individual modules within either the run time or development libraries. Use of one of the Eclipse libraries implies the availability of all utilities defined by that library.

    See Initializing the Eclipse Library.

    Library Format

    The Eclipse libraries are provided as pre-compiled, standard, static libraries, suitable for creating stand-alone applications (2).
  • libeclipse: defines the Eclipse run time library.
  • libeclipsed: defines the Eclipse development library.

    These are defined using the default file extension and format for each platform (eg. libeclipse.a).

    All Eclipse applications should be linked with the standard operating system provided ANSI C libraries (eg. libc.a and libm.a). See the Release Notes to see if there are any platform-specific operating system provided libraries that must also be used.

    Compiling With One Library and Running With Another

    It is not necessarily required that one link generated C code with the same library (or modules) that were being used by the application that generated the C code.

    For example, suppose you have a "development" application, such as the Eclipse top-level itself, that uses the development library. Suppose, further, that you use compile-file within this application to generate C code.

    After compiling the generated C code, you can link it with whatever library is appropriate for the application being created -- regardless of the fact that C code was created with a development library.

    This is true for different libraries, different library modules, and different library formats.

    In particular, even though defmacro requires the development library to be meaningful, one does not necessarilly have to strip defmacro definitions from source code if the corresponding generated application is to use only the run time library. The macro functions will still be present at run time, but there will be no Eclipse-provided utility which uses them.


    [Previous] [Next] [Up] [Documentation Contents] [Eclipse Home Page]