[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

C Headers and Libraries

Declarations needed to use an underlying library via APRON are collected in the C include files `ap_global0.h' and `ap_global1.h'. They respectively refer to the level 0 and the level 1 of the interface. One can also refer to single APRON modules with their corresponding include files `ap_dimension.h', `ap_lincons0.h', ... Header files `<stdio.h>', `stdlib.h' and `<stdarg.h>' will be required.

Then, you should also include the header files of the underlying libraries you want to use it via APRON (for instance, `box.h', `pk.h', `ap_ppl.h').

All programs using APRON must link against the `libapron', `libmpfr' and `libgmp' libraries, and the underlying libraries you want to use it via APRON:

  1. If some file `test.c' uses the POLKA library via APRON, the compilation command should look like `gcc -I$ITV/include -I$MPFR/include -I$GMP/include -I$APRON/include -L$MPFR/lib -L$GMP/lib -L$APRON/lib -o test test.c -lpolkaMPQ -lapron -lmpfr -lgmp', assuming that the POLKA library is used in its 'MPQ' version (internal number representation is GMP rationals) and resides in `$APRON/include' and `$APRON/lib' directories.

    The `libpolkaMPQ.a' library is of course needed, `libapron.a' contains all the code common to all APRON library (manipulation of expressions, environments, ...), as well as ITV functions (quasi)linearisation facilities of APRON,...), last the libraries libmpfr.a and libgmp.a are required both by NEWPOLKA and APRON .

  2. If some file `test.c' uses the PPL library via APRON, the compilation command should look like `g++ -I$ITV/include -I$MPFR/include -I$GMP/include -I$APRON/include -I$PPL/include -L$ITV/lib -L$MPFR/lib -L$GMP/lib -L$APRON/lib -L$PPL/lib -o test test.c -la_ppl -lppl -lgmpxx -lapron -lmpfr -lgmp', assuming that PPL resides in $PPL and PPL APRON interface in `$APRON/include' and `$APRON/lib' directories.

    Notice that the PPL library (`libppl.a') is a C++ library, you need to use `g++' instead of `gcc' for linking. You also need the C++ layer on top of GMP (`libgmpxx.a'). The `libap_ppl.a' library contains the layer on top of PPL which implements the APRON interface.

You should look at the specific documentation of the libraries for more details.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on September, 10 2009 using texi2html