Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
84 views

I'm on Windows OS and in the past month I used to compile a C/C++ project in Qt Creator IDE using MinGW's gcc/g++ compilers based on POSIX thread model, i.e. compilers that were built with the option -...
ahahfilip's user avatar
Advice
0 votes
2 replies
57 views

I wanted to define a record type with a Static_Predicate: -- irregular_matrices.ads generic type Element_Type is private; package Irregular_Matrices is subtype Index_Type is Positive; ...
tymurmchyk's user avatar
3 votes
2 answers
130 views

I'm trying to create a package of generic adjacency matrices to define graphs, and the first goal is to define a static version based on two-dimensional array: with Ada.Containers.Vectors; generic ...
tymurmchyk's user avatar
0 votes
2 answers
66 views

I'm trying to get the hang of the Ada.Text_IO package, and it has many differences with IO of C. One of them differences is how Get treats control characters and Horizontal or Character Tabulation ...
tymurmchyk's user avatar
0 votes
1 answer
63 views

I've written the next piece of code in order to declare a vector of lexical elements: type Lexical_Element_Kind is ( Delimiter, -- & ' ( ) * + , - . / : ; < = > | -- => .. ...
tymurmchyk's user avatar
3 votes
2 answers
135 views

I've created a generic package called Generic_Functions which must be instantiated in similar fashion to the standard Ada.Numerics.Generic_Real_Arrays and has next specification: with Ada.Numerics....
tymurmchyk's user avatar
1 vote
4 answers
179 views

I cannot find an answerin the reference manual, nor in the sections on strings in the AdaCore tutorials. Is the unit bytes (doubtful for bounded or unbounded strings), code units (pretty sure no), ...
Wayne's user avatar
  • 13
1 vote
1 answer
99 views

What are the differences in efficiency when using a scalar subtype rather than precondition and postcondition aspect clauses? There are several ways to evaluate efficiency. One is code terseness—using ...
Jim Rogers's user avatar
0 votes
3 answers
120 views

I do not have the ability to update our Ada compiler set so include the IEEE packages. Is there a way to convert a Float into a Hexadecimal integer? For instance, a Float value of 1.5 as input should ...
Stacey Robert Greenstein's user avatar
3 votes
1 answer
79 views

After building a docker container with: add-apt-repository ppa:ubuntu-toolchain-r/test apt-get update apt-get install -y gnat asis-programs I can make fine: gnatmake hello.adb, but when I try to run ...
DaveParillo's user avatar
  • 2,345
0 votes
1 answer
104 views

Hope you an help me, I am attempting to get into simple game development using Ada and the Raylib Ada binding. So far so good, I set everything up through Alire Package Manager, got VS Code to find ...
Ada Lovelace's user avatar
0 votes
1 answer
146 views

good, I'll get straight to the point. I have a program that needs to run tasks. These three tasks communicate with each other and call C functions for their needs. I wrote functions that call C ...
Dimitri Emmanuel Zokoualouba M's user avatar
-1 votes
1 answer
199 views

I have an Ada program that calls a C function. I have the C object file. I wrote an small test to see if it works. When I run: $ gnatmake main.adb -largs cfile.o -lpthread apparently there's no error ...
Dimitri Emmanuel Zokoualouba M's user avatar
1 vote
3 answers
146 views

I am working through a light example of calling Ada code from C++ code. I was able to induce a buffer overflow and read data past a buffer using the following code: main.cpp extern "C" { ...
Tyler Jenkins721's user avatar
3 votes
2 answers
173 views

I'm changing the compiler of a medium-sized codebase, mostly Ada (with some C & C++ modules), from ObjectAda (PTC) to Gnat. The product consists of ~100 Windows executables and ~20 dlls (~1500 Ada ...
Flo's user avatar
  • 46
0 votes
1 answer
86 views

The default format for Util.Log is [date] level - module - : message So something like [2025-03-04 08:29:28] INFO - main - : Crypt : dc7e84bfda79164b7ecd8486985d3860 I'd like to change the level ...
cup's user avatar
  • 8,548
0 votes
2 answers
56 views

The following compiles with Util.Log.Loggers; package body LogTest is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create("./abc.log"); ... end LogTest; The problem is ...
cup's user avatar
  • 8,548
0 votes
0 answers
74 views

here i've two projects (project1 and project2) on my machine (debian 12 if it help) which are into two different directories. the first, project1 is into All_My_Projects/App_Projects/Project1 and the ...
Dimitri Emmanuel Zokoualouba M's user avatar
2 votes
3 answers
255 views

Is there a simple way of printing hexadecimal numbers with leading zeros in Ada? The following will print a number with leading zeros in hex but it is a bit convoluted. with Interfaces; with Ada....
cup's user avatar
  • 8,548
3 votes
0 answers
94 views

type Number_Type is delta 0.000_1 digits 18; -------------------------------------------------------------- -- Round Number To Decimal 0 ------------------------------------------------------...
mcxbain's user avatar
  • 131
1 vote
1 answer
223 views

I have installed gnat-2021-20210519-x86_64-linux-bin from https://www.adacore.com/download When I tried to build simple project with gprbuild tst.gpr, linking failed with messages Link [link] ...
Kapturak's user avatar
1 vote
2 answers
75 views

I'm learning Ada, and I wrote a function to calculate the factorial of a number and a simple program to call it. However, depending on the way I format the display of the result, my variable gets a ...
Effective_Set_3418's user avatar
0 votes
2 answers
78 views

"MISSING A callback handler is also needed for the X button when you close the dialog otherwise it never closes and remains in the background." I tried the attached code to solve this, but ...
Mark's user avatar
  • 69
1 vote
1 answer
80 views

The attached code compile & runs. -I should want to retrieve & manipulate the file name of a GtkAda widget. I do see it's possible when we manage directly the object (How to create a file ...
Mark's user avatar
  • 69
0 votes
1 answer
139 views

I am compiling a program with "Build & debug" and get the following error message: [2024-12-12 11:24:45] Could not determine the project for file: D:\ada\project\Sudoku\Sudoku_main.gpr [...
ldries46's user avatar
0 votes
2 answers
124 views

Whenever I look up logging in Ada, one of the recommendations is GNATCOLL.Traces. I can see the documentation for it but there is no code. If I try something like with GNATCOLL.Traces; I get an ...
cup's user avatar
  • 8,548
5 votes
1 answer
134 views

When trying to get the first or last index of an unbounded string, as shown in this program with Ada.Strings; use Ada.Strings; -- for `Backward` with Ada.Strings.Unbounded; with Ada.Text_IO; use Ada....
zorleone's user avatar
2 votes
1 answer
95 views

Is there a way of speeding up an alr build with gtk? Say I start a new project. alr init --bin a98xml alr with gtk That is simple enough. alr build This takes about 4 minutes. We only have to do ...
cup's user avatar
  • 8,548
0 votes
1 answer
89 views

the attached code compile & runs. $ ./xml_code Loading of XML is OK (xml_code:31196): Gtk-CRITICAL **: 22:24:59.048: gtk_color_chooser_get_rgba: assertion 'GTK_IS_COLOR_CHOOSER (chooser)' failed ...
Mark's user avatar
  • 69
0 votes
0 answers
181 views

I have a couple of executables that I want to be able to use the same libraries. After building, I want the tree to look like this (simplified example): Root |--Prog1 | |--src | |--obj | |--Prog1....
Devsman's user avatar
  • 498
0 votes
1 answer
130 views

I have a mixed C++ and Ada project. A GPRbuild project is used to build it and there is no makefile. There is a script which creates an H file with constants such as build host, username and git ...
Artium's user avatar
  • 5,391
0 votes
1 answer
96 views

I'm implementing a minimal Ada RTS for the esp32s3 SoC. Currently, I am stuck with an error that's proving resistant to every solution I've thrown at it. It claims putchar is undefined: Link [link] ...
ATL_DEV's user avatar
  • 9,658
0 votes
1 answer
112 views

I've just installed alr on Linux. Haven't used ada for about 10 years and found that gnat community is no longer supported. Entered the following program with Ada.Text_IO; procedure A02hello is ...
cup's user avatar
  • 8,548
0 votes
0 answers
106 views

Hi everyone and sorry again for the inconvenience but since then I have created a window with gtkada to which I want to change the color of the background with css, but this is where things get ...
Dimitri Emmanuel Zokoualouba M's user avatar
2 votes
1 answer
124 views

I am having trouble getting dynamic dispatching to work with Ada generics. Is there an elegant way (something better than conditions such as if X in A then ...) to have the generic Print procedure in ...
user1091344's user avatar
1 vote
1 answer
202 views

I'm currently trying to create an ada program (this will be relevante later on) with a basic TUI. To do so, I'm using ncurses, and more specifically, I'm interfacing with C as the ada bindings, ...
Akutchi's user avatar
  • 13
0 votes
0 answers
117 views

i can't to install gtkada on my Linux PC. I tried look at the adacore's docs but I can't to understand. please someone can help me to install gtkada.i'm really blocked. after to have download and ...
Dimitri Emmanuel Zokoualouba M's user avatar
0 votes
0 answers
65 views

I'm not too sure what I did, but I accidentally solved my issue? While I was working on integrating comma support I decided to extract from the below function the conditions and put it in another one. ...
Akutchi's user avatar
  • 13
2 votes
2 answers
142 views

Assume I have the following subprogram declared in the specification. package Waiter is type Time_Span is ????; -- Time_Span definition TBD... procedure Wait (Period : Time_Span); end Waiter; ...
ATL_DEV's user avatar
  • 9,658
2 votes
1 answer
141 views

So I was creating a guessing game for Ada but yeah it doesn't run. The error is in Line 25. It says guessing_game.adb:25:26: error: no candidate interpretations match the actuals: with Ada.Text_IO; ...
francis245's user avatar
2 votes
2 answers
294 views

I tried to convert the array concatenation in function A to the new Ada 2022 reduction expression (see function B), but I get a range check failed error. What am I doing wrong? with Ada.Text_IO; ...
user1091344's user avatar
2 votes
2 answers
159 views

How can I iterate over a range in Ada with a custom step ? For I in Integer'Range loop -- do something every 10 steps end loop; Can I define a subtype with specific step ?
A.Pissicat's user avatar
  • 3,335
1 vote
1 answer
106 views

First of all I want to apologize for something wrong I will say, I'm new to Ada and Alire. I am trying to use the whitakers-words dictionary (https://github.com/mk270/whitakers-words) for a personal ...
Dennis Pierantozzi's user avatar
3 votes
4 answers
504 views

For cross-compilation I need to specify the MCU type as a option to the Ada, C and theoretically C++ compiler. How can I do that and in a way that it is also applied when building the dependencies? At ...
Torsten Knodt's user avatar
5 votes
2 answers
188 views

If I wrote type u1 is range 0 .. 1; type Index is range 0 .. 499999; type U1Array is array(Index) of u1; can I assume, that this will be a bit vector, which is packing the single u1 instances ...
BitTickler's user avatar
  • 12.1k
3 votes
2 answers
211 views

Package pack1 is Type int_acc_type is access all integer; End pack1; --Local procedure with pack1; Procedure main is Int_acc : pack1.int_acc_type; Int_var : aliased integer; Begin Int_acc ...
Gumidelli Venkatesh's user avatar
0 votes
1 answer
209 views

I have two packages called Passenger and Booking. They have a one to many relationship. I encountered a circular dependency error when I tried to do with in both of their files. I then tried limited ...
Royal Mail's user avatar
2 votes
2 answers
146 views

How can I define a subtype of String that allows only hex characters to be used? Here is my attempt, but I fail at the subtype definition: subtype Hex_Character is Character with Static_Predicate =&...
user1091344's user avatar
0 votes
0 answers
140 views

I'm trying to get HTTPS requests working with Ada Web Server (AWS) found at https://github.com/AdaCore/aws/tree/master I'm on Windows 11 and I don't understand how to make a build of the library and ...
Royal Mail's user avatar
1 vote
0 answers
232 views

I am trying to make HTTPS Get requests to websites in Ada web server. I can currently do HTTP requests without issues but HTTPS fails - possibly due to SSL Certificates. I am only using the client ...
Royal Mail's user avatar

1
2 3 4 5
49