使用X code在MacOS X上安装GMP [英] Installing GMP on MacOS X with Xcode

查看:500
本文介绍了使用X code在MacOS X上安装GMP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用GMP库在我的C和C ++程序。
我使用的是X code code。
我按照说明我的机器上安装的GMP和我结束了一个文件夹〜在/ usr /本地/ GMP-5.0.5,其中包含了gmp.h文件。

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 folder "~/usr/local/gmp-5.0.5" which contains the gmp.h file.

我怎样才能让我的程序,看看这个库?如果我决定拯救我的程序在桌面上,例如???

How can I make my programs to see this library? if I decided to save my programs on desktop for example???

在哪里安装GMP-5.0.5最好的地方?
使用包括gmp.h将会显示错误未找到文件。

Where is the best place to install the gmp-5.0.5??? Using include "gmp.h" will show the error "file not found".

推荐答案

我已经这样做了:

从下载 https://gmplib.org/ (GMP-6.0.0a.tar.lz)GMP
http://www.nongnu.org/lzip/lzip.html 下载lzip( lzip-1.16.tar.gz)

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. 安装lzip

    • 解压:焦油-xvf lzip-1.16.tar.gz

    • CD lzip-1.16

    • ./配置


    • 请检查

    • 请安装(使用sudo如果您收到许可被拒绝的消息运行)


  • 的GMP-6.0.0a.tar.lz文件复制到/ usr / local / lib目录(使用sudo做到这一点)

  • 提取LZ:lzip -d GMP-6.0.0a.tar.lz

  • 提取tar:焦油-xvf GMP-6.0.0a.tar

  • CD GMP-6.0.0 /

  • ./配置


  • 请检查

  • 请安装(使用sudo如果您收到许可被拒绝的消息运行)

这篇关于使用X code在MacOS X上安装GMP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆