gmp

From Lazarus wiki
Revision as of 17:40, 20 October 2009 by Befelemepeseveze (talk | contribs) (added note about gmp dev package)
Jump to navigationJump to search

An editor has declared this article to be a stub, meaning that it needs more information. Can you help out and add some? If you have some useful information, you can help the Free Pascal Wiki by clicking on the edit box on the left and expanding this page.

The current /trunk FPC version (2.5.1) and the /branches/fixes_2_4 (the upcoming 2.4 release) already include an initial version of a Free Pascal interface for the GNU Multiple Precision Arithmetic Library in packages/gmp.

To use the bindings in your projects (and be able to build them) you have to:

  • Include gmp in the uses clause of a program/unit source from which you will use the GMP types/functions.
  • Have the gmp library installed on your system
    • Most, if not all, *nix systems have GMP (libgmp) installed by default but it is still necessary to have the dev package (libgmpX-dev) installed also (needed in the link stage). This package is not included by default everywhere (eg. Ubuntu).
    • On Windows, you can get the mingw-dynamic package and rename it to gmp.dll.
  • Have the necessary knowledge of the GMP documentation.