Next: , Up: MPRIA Basics   [Index]


4.1 Headers and Libraries

All declarations needed to use MPRIA are collected in the C header file mpria.h; it is designed to work with both C and C++ compilers. You should include this file in any program using MPRIA:

#include <mpria.h>

All programs using MPRIA must link against both libmpria and libgmp libraries. On typical Unix-like systems this can be done with ‘-lmpria -lgmp’ (in that order), for example:

gcc -o myprogram myprogram.c -lmpria -lgmp

GMP and MPRIA libraries are both built using Libtool, thus an application can use that to link if desired (see Integrating libtool in GNU Libtool).

If GMP or MPRIA have been installed to non-standard locations then it may be necessary to use ‘-I’ and ‘-L’ compiler options to point to the right directories, and some sort of run-time path for shared libraries.