|
The Ada core library is mostly a thin wrapper for the C++ core library and exposes all core interfaces in Ada. It is intended for mission critical systems and as a basis for the general-purpose Ada library.
The Ada general-purpose library is intended to mirror the functionality of the C++ library, but offers additional benefits due to the tight integration with Ada tasking.
The Ada libraries depend on the C++ core library, so that should be compiled first - please see the steps described above. In addition, the C++ core library archive needs to be linked into the final Ada applications.
Dedicated build files for the GNAT Project Manager are provided to ease the compilation process - note, however, that on most systems these .gpr
files might require some modifications to properly point to dependent libraries. The files that might require special attention are:
std_cpp.gpr
, which should point to the C++ runtime library that is consistent with the GNAT compiler version. The Library_Dir
variable should be set up to name the directory containing the libstdc++.a
file. For example, on the Windows platform with GNAT 2013 installed in the root directory, a proper setting might be: for Library_Dir use "C:\GNAT\2013\lib";
Ws2_32.gpr
file should point to the location of the libws2_32.a
library on Windows, for example:for Library_Dir use "C:\GNAT\2013\lib\gcc\i686-pc-mingw32\4.7.4";
open_ssl.gpr
file should point to the location of the OpenSSL library if the integration with SSL is intended - the support for SSL can be switched on by appropriate modification at the beginning of the yami.gpr
file.Once the library paths are properly set up, the following commands can be used to compile the Ada library:
$ cd src/ada $ gnatmake -Pyami
After compilation the libyamiada.a
file and a set of ALI files will be copied to the lib
directory in the root project directory.
The doc/ada
directory contains the generated API documentation for both the Ada Core wrapper and the general-purpose Ada library.
In addition to the Ada core and Ada general-purpose libraries the Ada-Ravenscar variant of the core was added for systems that need to be compatible with the Ravenscar execution profile. The are minor interface differences with respect to the Ada core library, which take into account Ravenscar restrictions on implicit use of dynamic memory. The Ada-Ravenscar library can be compiled in the same manner as the Ada core library.