C++ BigIntegers: Installing a static GMP library with the C++ class extensions (gmpxx.h)
So I was spending some time with GMP today, trying to install it on my Ubunty Natty (11.04). [1] I wanted to finally get BigInteger support for C/C++ in a hassle free manner. Naturally, I turned to my trusty Synaptic to get and install the libraries. A quick search for libgmp in the repository turned up some old versions of GMP and some modified packages. I was surprized! I was expecting libgmp to be in the Ubuntu repository. A quick Google confirmed that Ubuntu doesn't ship with GMP 5 (which was the latest at the time of this blog post). So I set down to install the library from source. So, first things first: 1) Get the gmp-5.0.2 library (or whatever's the latest now) from http://www.gmplib.org 2) Verify the file using gpg (Always a good practice) gpg --verify gmp-5.0.2.tar.bz2.sig gmp-5.0.2.tar.bz2 You might get an error at this stage saying that the public key is not available. To fix that, issue gpg --search-keys ...