The (free) Ada95 Booch Components Get Ada 95 Booch Components at
SourceForge.net. Fast, secure and Free Open Source software downloads

Installation

--

Introduction

The Ada 95 Booch Components (BCs for short) can be used without special installation. After unpacking, all the source files are in the src/ subdirectory of the distribution. For compilers other than GNAT, it should be enough to import these source files in the appropriate way.

Use with GNAT

Simple source inclusion

For GNAT, a similar technique can be applied: include the source directory in the compiler source path,

   $ gnatmake -I$HOME/bc-20110809/src foo.adb

Using GNAT Project

Alternatively, using the GNAT Project facility, add bc.gpr to your project's withs:

   with "/Users/simon/bc-20110809/bc";
   project Foo is
      ...

Rather than explicitly naming the location of bc.gpr in your own GPR files, a better way of using GNAT Project is to add the BC's top-level directory to your ADA_PROJECT_PATH or GPR_PROJECT_PATH environment variable: in the shell, or (the equivalent of) ~/.bashrc:

   $ export ADA_PROJECT_PATH=~/bc-20110809:$ADA_PROJECT_PATH

and then, in the GPR,

   with "bc";
   project Foo is
      ...

Note, you will need to use the -p switch to gnatmake or gprbuild to tell them to create the necessary build directories.

Project options

Library style

With this approach, you can choose to use a static or relocatable version of the library; the default is static. There's no great advantage to choosing the relocatable version, since the BCs are mainly generic and most of the object code will be in the instantiations, in your library. Also, the relocatable version needs to be located at run time, and at the time of writing (20110809) this is only assured on Mac OS X (and then only if you use gprbuild).

To override the default, set the scenario variable LIBRARY_TYPE to relocatable, either in the environment or using the -XLIBRARY_TYPE=relocatable flag to gnatmake or gprbuild. This flag is used for the same purpose in AdaCore's library components (GNATcoll, XML/Ada etc), though possibly with a different default.

Language level

The BCs can be built against the Ada 2005 or 2012 standards if required; the scenario variable LANGUAGE can be set to gnat95 (default), gnat05 or gnat12.

Using GNAT Project with Debian 6

If you're running Debian 6 (squeeze), there is a small change needed (gnatmake doesn't understand external_as_list() in a Project file): say

   $ patch -p0 <debian-6.diff

Installation with the compiler

If you're using GCC or GNAT GPL, the best way is to install the BCs alongside your compiler.

The remaining instructions assume use on a Unix machine, or Cygwin if on Windows.

First,

   $ make

to build both static and relocatable versions of the library, followed by

   $ make install

(you may need to do this as root on Unix systems).

--

[index]