Gnat for Mac Ada编程 [英] Gnat for Mac Ada programming
问题描述
我在我的编程类学习Ada 95,并希望安装在我的Macbook。我目前有gedit作为我的文本编辑器,因为这是我们在我们的实验室环境中使用。事情是,我不知道在哪里可以得到一个好的gnat来编译我的代码,以及如何安装它。我是新的到Mac的世界,所以任何帮助将非常感谢。 :D
I'm learning Ada 95 in my programming class and would like to install this on my Macbook. I currently have gedit as my text editor because thats what we're using in our lab environment. The thing is, is that I have no clue as to where to get a good gnat to compile my code, and how to install it. I'm new to the Mac world so any help would be greatly appreciated. :D
推荐答案
有一个很好的免费Ada编译器为Mac OS X 来自AdaCore 。
There's an excellent free Ada compiler for Mac OS X available from AdaCore.
您应该可以使用GNAT GPL版本。按照下载链接 - 选择免费软件学术发展 - 在页面底部,按照制作您的下载包。
You should be OK with the GNAT GPL edition. Follow the Download link - choose Free Software of Academic Development - at the bottom of the page, follow Build your Download Package.
选择您的平台为 x86_64-darwin
, 2012
。点击 GNAT 2012 ,然后点击 gnat-gpl-2012-x86_64-apple-darwin10.8.0-bin.tar.gz
Select your platform as x86_64-darwin
, 2012
. Click on GNAT 2012, then on gnat-gpl-2012-x86_64-apple-darwin10.8.0-bin.tar.gz
(this contains all you'll need for the moment).
您还需要Xcode(Mac OS X免费)。前狮子,这是(我认为)安装DVD上的可选安装。在Lion或ML中,您需要从App Store获取它(在ML中位于类别> 开发者工具> Xcode )。在ML中,您还需要安装命令行工具:打开Xcode,然后选择 首选项 em>,请在命令行工具中选择。
You'll also need Xcode (free with Mac OS X). Pre-Lion, this was (I think) an optional install on the installation DVD. In Lion or ML, you need to get it from the App Store (in ML it's at Categories > Developer Tools > Xcode). In ML, you also need to install the command line tools: open Xcode, then Xcode > Preferences > Downloads > Components, select Install against the Command Line Tools.
我说首先安装Xcode,因为GNAT安装需要它是否安装命令行工具通过这使得
:如果答案回来空白,他们没有安装)。无论如何,对于GNAT安装,
I say to install Xcode first, because the GNAT install needs it (you can tell whether the command line tools are installed by saying which make
: if the answer comes back blank, they aren't installed). Anyway, for the GNAT install,
$ cd
$ tar zxvf ~/Downloads/gnat-gpl-2012-x86_64-apple-darwin10.8.0-bin.tar.gz
$ cd gnat-gpl-2012-x86_64-apple-darwin10.8.0-bin
$ sudo ./doinstall
安装程序完成后不需要安装程序,因此可以删除它。
You don't need the installer after it's finished, so you can delete it.
默认情况下在 / usr / local / gnat
下安装GNAT,并且需要确保 / usr / local / gnat / bin
是您的路径上的第一个(无论如何,在 / usr / bin
之前)。我将编辑〜/ .bash_profile_common
添加
The defaults install GNAT under /usr/local/gnat
, and you'll need to make sure that /usr/local/gnat/bin
is first on your path (at any rate, ahead of /usr/bin
). I'd edit ~/.bash_profile_common
to add
PATH=/usr/local/gnat/bin:$PATH
但我仍然有麻烦知道〜/ .bash *
文件做什么!
but I still have trouble knowing which of the ~/.bash*
files do what!
这篇关于Gnat for Mac Ada编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!