Ada bindings

From Agar

(Redirected from Ada Bindings)
Jump to: navigation, search

Agar provides bindings to the Ada programming language.

Installing the Agar Ada bindings

In the Agar source tree, the bindings for Agar-Core and Agar-GUI are located under the ada-core/ and ada-gui/ directories, respectively.

To set the installation directories, edit the files:

  • conf-bindir: For binaries (default /usr/local/bin)
  • conf-dlibdir: For dynamic libraries (default /usr/local/lib/agar-ada)
  • conf-slibdir: For static libraries (default /usr/local/lib/agar-ada-static)
  • conf-incdir: For header files (default /usr/local/include/agar-ada)
  • conf-repos: For source code (default /usr/local/share/agar-ada)

To compile the bindings, use:

$ make
$ make tests
# make install
$ make install-check

Using the bindings

Use the following commands to compile an application with the Agar Ada bindings. Substitute ada-foo for the compiler of your choice.

$ ada-compile test1.adb \
    `agar-core-ada-conf compile incdir cflags`
$ ada-bind test1.ali
$ ada-link test1 test1.ali \
    `agar-core-ada-conf compile slibdir ldflags` \
    `agar-core-config --libs`

To test the application:

./test1

This section was marked as being a stub. You are welcome to help expand it.

Personal tools