首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >mac os x上的Mozart/Oz配置问题

mac os x上的Mozart/Oz配置问题
EN

Stack Overflow用户
提问于 2019-05-16 10:18:16
回答 1查看 449关注 0票数 1

我试图使用以下链接在Mozart/Oz上构建Mac os x Mojavehttps://github.com/mozart/mozart,并得到以下配置错误。未找到GNU MP库。

我使用gmp安装了homebrew,并尝试了--with=/usr/local/opt/gmp/lib和-with-gmp=/usr/local/c业力/gmp/6.1.2_2/,但得到了相同的错误。有人能帮我解决这个问题吗?

代码语言:javascript
复制
checking for --with-gmp... yes
checking for gmp.h... -I/Users/rr/Software/mozart/gmp/packages/include
checking for __gmpz_init in -lgmp (default)... no
checking for __gmpz_init in -L/Users/rr/Software/mozart/gmp/packages/lib/ -lgmp... no
checking for mpz_init in -lgmp (default)... no
checking for mpz_init in -L/Users/rr/Software/mozart/gmp/packages/lib/ -lgmp... no
checking for mpz_init in -lgmp2 (default)... no
checking for mpz_init in -L/Users/rr/Software/mozart/gmp/packages/lib/ -lgmp2... no

configure: warning: required GNU MP lib not found
configure: error: 
The GNU Multiple Precision Arithmetic Library (gmp)
version 2 or higher is required
to build the system.  It can be retrieved from:

    ftp://ftp.gnu.org/pub/gnu/gmp/

The latest version at this time is 4.1.2 and is available
packaged as the following archive:

    ftp://ftp.gnu.org/pub/gnu/gmp/gmp-4.1.2.tar.gz

You may find a mirror archive closer to you by consulting:

    http://www.gnu.org/order/ftp.html

configure: error: /Users/rr/Software/mozart/mozart/platform/emulator/configure failed for emulator
configure: error: /Users/rr/Software/mozart/mozart/platform/configure failed for platform
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-11-27 13:52:42

1:安装Mozart2

1.1:Link:https://mozart.github.io/

1.2Applications/Mozart2应该如下所示:https://i.imgur.com/BQbXrey.png

此外,我不能嵌入图像,因为我的低StackOverflow声誉,对不起。

2:为oscozemulator添加别名

2.1:Open .bash_profile

代码语言:javascript
复制
open ~/.bash_profile

2.2:将以下内容添加到文件中并保存

代码语言:javascript
复制
alias ozc='/Applications/Mozart2.app/Contents/Resources/bin/ozc'
alias ozemulator='/Applications/Mozart2.app/Contents/Resources/bin/ozemulator'
alias ozem='/Applications/Mozart2.app/Contents/Resources/bin/ozemulator'
alias ozengine='/Applications/Mozart2.app/Contents/Resources/bin/ozengine'
alias ozwish='/Applications/Mozart2.app/Contents/Resources/bin/ozwish'

3:基本用法

3.1:在.oz-file示例中编写代码:circle.oz

代码语言:javascript
复制
functor
import
    System 
    Application(exit:Exit)
define
    proc {Circle R}
        local A C D Pi in
            Pi = 3.14
            A = Pi*R*R
            D = 2.0*R
            C = Pi*D 
            {System.showInfo 
                'A: '    # A # '\n' #
                'D: ' # D # '\n' #
                'C: '  # C
            }
        end
    end
    {Circle 20.0}
    {Exit 0}
end

3.2:在ozc中编译代码

代码语言:javascript
复制
ozc -c circle.oz

3.3:在ozemulator中运行编译代码

代码语言:javascript
复制
ozem circle.ozf # .ozf is a compiled .oz file
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56166240

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档