Difference between revisions of "gmp"

From Lazarus wiki
Jump to navigationJump to search
(GMP FPC bindings initial wiki stub)
 
m (added note about gmp dev package)
Line 5: Line 5:
 
* Include gmp in the uses clause of a program/unit source from which you will use the GMP types/functions.
 
* 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
 
* Have the gmp library installed on your system
** Most, if not all, *nix systems have GMP (libgmp) installed by default.
+
** 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 [http://cs.nyu.edu/exact/core/gmp/ mingw-dynamic package] and rename it to gmp.dll.
 
** On Windows, you can get the [http://cs.nyu.edu/exact/core/gmp/ mingw-dynamic package] and rename it to gmp.dll.
 
* Have the necessary knowledge of the [http://gmplib.org/#DOC GMP documentation].
 
* Have the necessary knowledge of the [http://gmplib.org/#DOC GMP documentation].

Revision as of 17:40, 20 October 2009

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.