Gnat for Mac Ada programming

后端 未结 2 736
南笙
南笙 2021-01-04 13:48

I\'m learning Ada 95 in my programming class, and I would like to install the gnat compiler on my MacBook. I have no clue as to where to get a good gna

2条回答
  •  执念已碎
    2021-01-04 14:18

    I have OS X Yosemite 10.10.3, and I followed the following steps.

    1. Download GNAT from this place http://libre.adacore.com/download/configurations. Choose Mac OS X as the platform.

    2. Execute the following commands on the terminal:

      1. Unzip or (tar the file downloaded from the previous step, for example, as follows:

        tar zxvf gnat-gpl-2012-x86_64-apple-darwin10.8.0-bin.tar.gz   
        

        Note: this assumes that you're in the same folder as the file you downloaded in step 1.

      2. cd gnat-gpl-2012-x86_64-apple-darwin10.8.0-bin

      3. sudo ./doinstall

    3. Edit your .bash_profile file under /Users/{YOUR_USER_NAME}/.bash_profile to also have the following line

      export PATH=$PATH:/opt/local/bin:/usr/local/gnat/bin
      
    4. Save the .bash_profile file.

    5. Open a new terminal. You should now be able to execute gnatmake.

提交回复
热议问题