Issue
I was able to install GMP following a tutorial using MSYS2 in Windows, however I am quite unsure of how to do the same on Linux Mint. I can't use Windows as I need to use C++17, which MSYS2 doesn't let me do because my windows is outdated, so to use C++17 I use Linux. I am using a clang compiler, but I don't know how to install GMP to use with it on Codeblocks. https://gmplib.org/
Solution
Download gmp
from here.
wget https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz
unxz gmp-6.2.1.tar.xz
tar xzvf gmp-6.2.1.tar
cd gmp-6.2.1
./configure
make
sudo make install
it should be installed under /usr/local/
.
The debian way: Enable the sources repositories under your /etc/apt/sources.list.d/
then install apt-src
to easily build the package:
sudo apt update
sudo apt install apt-src
apt-src update
apt-src install gmp
apt-src build gmp
Next step install the *.deb
file through apt
, dpkg
or gdebi
.
Why building gmp
?: because only the source package is available on debian/ubuntu derivatives (Source Package: gmp (2:6.1.2+dfsg-2) )
Answered By - GAD3R Answer Checked By - Marilyn (WPSolving Volunteer)