gnat Questions

3

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 gnat to compile my code, and how to install it. I...
Issy asked 28/1, 2013 at 16:47

3

The information about Ada.Containers.Functional_Maps in the GNAT documentation is quite—let's say—abstruse. First, it says this: …these containers can still be used safely. In the second paragrap...
Lame asked 23/3, 2021 at 14:50

3

Solved

When I try to generate unit tests in GNAT 2020 Community Edition (Windows 10 64 bit), I get an error on missing gnattest tool: could not locate gnattest. Same happens on Ubuntu 20.04 (in WSL) with ...
Henhouse asked 16/6, 2020 at 9:53

3

Solved

I've encountered an issue where using modular types in Ada that are not divisible by the system's Storage_Unit ( as defined in the runtime's system.ads ) will raise a Constraint_Error at runtime wh...
Thaumatrope asked 21/5, 2020 at 11:4

1

I wrote a code in a few languages (C, C++, Fortran77, Fortran90) and I can compile it without any sort of problem by using CMake. It works out perfectly. Now, I would like to add in the main(), wh...
Financial asked 23/4, 2020 at 14:0

1

Solved

I downloaded the GNAT Community 2019 and have installed on my Mac in my home folder "/Users/leon/opt/GNAT" I run the command "gps" in the directory "/Users/leon/opt/GNAT/2019/bin". And GPS showed ...
Omit asked 28/2, 2020 at 15:19

1

Solved

I am having trouble with dynamic and static linking a library in Ada. I have prepared a minimum working example. These three files define a library that outputs "Hello world": helloworld_lib.gpr: ...
Seidler asked 12/2, 2020 at 16:25

5

Solved

I have the following code for network protocol implementation. As the protocol is big endian, I wanted to use the Bit_Order attribute and High_Order_First value but it seems I made a mistake. With...
Attract asked 18/6, 2019 at 19:55

2

Solved

In the following code example the variable Time_Two is not initialized. This results into a random output like: Time one: 2019-06-27 16:18:21 Time two: 2150-01-02 16:01:18 Does Ada offers a func...
Listless asked 27/6, 2019 at 14:24

1

Without utilizing the nonstandard‡ Scalar_Storage_Order clause in recent releases of GNAT, how can, say, the IPv4 header be portably represented via Record Representation Clause(s) in conjunction w...
Piezoelectricity asked 16/5, 2018 at 3:56

1

Solved

I can't seem to get GNATCOLL to compile in an Alpine Linux based Docker Container. My container so far is: FROM alpine:edge # Add extra repositories RUN echo 'http://dl-cdn.alpinelinux.org/alpin...
Mulloy asked 9/4, 2019 at 15:31

2

Solved

I have a tagged type that implements a number of functions. In one case I need one of these functions to instead enter an infinite loop. Unfortunately as far as I can tell there is no way for me to...
Acetum asked 18/2, 2019 at 20:31

3

Solved

How to make/create a GUI (Graphical User Interface) in Ada programming language? It is possible? In Python, you can use tkinter to make a window form.
Chadd asked 13/1, 2019 at 17:27

1

Solved

I'm trying to do some basic translations of old C++ code from many moons ago to learn Ada, and I have been absolutely stumped on how to sort a vector using the built-in Generic_Sorting. I haven't b...
Periscope asked 5/12, 2018 at 4:28

1

Solved

With GPRBuild, I have created a library project called Lib. All packages in Lib reside within the package Base, which I use as a base package: to have a base package Base. For instance, if I were t...
Durban asked 2/11, 2018 at 18:45

2

I wonder what is the fundamental difference between binding and linking when working with Ada code? I couldn't find a good explanation on google and this is why I ask the question. For the binding...
Insulin asked 1/6, 2018 at 8:10

2

Using GNAT Ada and Gnu C++, I'm interfacing an Ada piece of code with a c++ wrapper and I'd like to catch Ada exceptions properly when running this (stupid) code: with ada.text_io; package body a...
Droll asked 21/5, 2018 at 11:58

1

Solved

In Java, one would use the instanceof in order to check if an object is of the same type (or class-wide type) as another object. For instance, if we have the class Peach and an object peach, it wou...
Oversew asked 26/1, 2018 at 10:28

2

Solved

It's useful to have a separate directory to store object files in. However, gprbuild will complain if the directory doesn't already exist. I use hg for version control, which doesn't allow you to t...
Keyboard asked 2/10, 2017 at 6:25

1

Solved

I am trying to create an ada library and have tried a few different things. I have tried compiling the project using makefiles and trying to create a library from all the .o files This seemed to no...
Gorgonzola asked 7/11, 2014 at 16:18

2

Solved

In this multi-language GPRBuild project I'm working on, I have some c++ library files (*.a) I need to link into my executable. Is there an gpr attribute to tell it what to link in or anyway to pass...
Assr asked 17/9, 2012 at 17:4

1

Solved

I am trying to understand the fundamental differences between the Gnat compiler that is delivered with the Adacore Libre version and the one that comes standard with the gcc say in a Linux distribu...
Descant asked 14/5, 2014 at 11:50

1

Solved

I installed GNAT on my OS X 10.8.5 machine with the following steps: Download GNAT GPL from http://libre.adacore.com/download/configurations Install with ./doinstall, accepting all the default op...
Honeysweet asked 25/10, 2013 at 17:39

1

Solved

Can anyone explain me the difference between the Ada "procedure" and "function"?
Knowable asked 5/4, 2013 at 14:53

3

Solved

I use Linux mint. Installed gnat to work with Ada programs, using "sudo apt-get install gnat". created a simple hello world program: with Ada.Text_IO; procedure Hello is begin Ada.Text_IO.Put_Lin...
Klayman asked 16/1, 2013 at 13:51

© 2022 - 2024 — McMap. All rights reserved.