Installing GMP on MacOS X with Xcode

后端 未结 2 1871
死守一世寂寞
死守一世寂寞 2021-01-03 13:54

I\'m trying to use the GMP library in my C and C++ programs. I do code using the Xcode. I followed the instructions to install the GMP on my machine and I end up with a fold

2条回答
  •  臣服心动
    2021-01-03 14:28

    I have done it this way:

    Download GMP from https://gmplib.org/ (gmp-6.0.0a.tar.lz) Download lzip from http://www.nongnu.org/lzip/lzip.html (lzip-1.16.tar.gz)

    1. install lzip
      • extract it: tar -xvf lzip-1.16.tar.gz
      • cd lzip-1.16
      • ./configure
      • make
      • make check
      • make install (run it with sudo if you receive permission denied message)
    2. install gmp
      • copy the gmp-6.0.0a.tar.lz file to /usr/local/lib (do it with sudo)
      • extract the lz: lzip -d gmp-6.0.0a.tar.lz
      • extract the tar: tar -xvf gmp-6.0.0a.tar
      • cd gmp-6.0.0/
      • ./configure
      • make
      • make check
      • make install (run it with sudo if you receive permission denied message)

提交回复
热议问题