Menu
  • HOME
  • TAGS

Missing “.ali” files when using gnatmake on Mac OS X

osx-yosemite,ada,gnat

export MACOSX_DEPLOYMENT_TARGET=10.9 Read more here: http://lists.gnu.org/archive/html/libtool-patches/2014-09/msg00002.html...

CONSTRAINT_ERROR on reading a file containing “[”

ada,gnat

Use the "Form" parameter to the Open call to specify the character encoding as something other than "WCEM=b" for bracket. with Ada.Wide_Text_IO; use Ada.Wide_Text_IO; procedure Main is File : File_Type; File_Name : String := "Data.txt"; begin Open (File, In_File, File_Name, Form => "WCEM=8"); while not End_Of_File (File) loop declare Line...

Pre-processing to inject log statements with minor visibility in source code

git,logging,editor,ada,gnat

If you are using GPS, you could try using the plugin gps_utils.highlighter from ps_utils.highligher import * Regexp_Highlighter( regexp='if logging_enabled.*end if', style=OverlayStyle( foreground='gray' ) ) You will likely have to play a bit with things to get it right, but that should allow you to simply highlight (or as the case...

How to install ADA IDE and compiler on mac (OSX)?

ada,gnat

You should have downloaded gnat-gpl-2014-x86_64-darwin-bin.tar.gz. Go to some temporary directory (I use ~/tmp): cd ~/tmp Unpack the download, which creates a directory gnat-gpl-2014-x86_64-darwin-bin containing the binary distribution to be installed: tar zxvf ~/Downloads/gnat-gpl-2014-x86_64-darwin-bin.tar.gz Enter that directory, which contains (amongst others) doinstall: cd gnat-gpl-2014-x86_64-darwin-bin Execute doinstall to enter the installation dialog:...

Gnatmake undefined reference (libcairo)

linker,ada,undefined-reference,gnat

You asked the same question on comp.lang.ada I believe. Just for the record, the answer from Ludovic Brenta was to: install libpixman-1-dev, and then edit the Linker'Linker_Options switch in your project file so that it contains "-lpixman-1". It is possible that when running from GPS, the linker sees a different...

What caused this Ada compilation error “ambiguous character literal”?

ada,gnat

From this post https://gcc.gnu.org/onlinedocs/gnat_rm/Legal-Ada-83-programs-that-are-illegal-in-Ada-95.html: The problem is that 'A' and 'Z' could be from either Character or Wide_Character. The simplest correction is to make the type explicit; e.g.: for Char in Character range 'A' .. 'Z' loop ... end loop; with Ada.Text_IO; use Ada.Text_IO; procedure for_Loop is begin for Counter...

Ada - Sending HTTP response with GNAT.Sockets

sockets,http,http-headers,ada,gnat

String’Output “writes the value of Item to Stream, including any bounds or discriminants” (ARM 13.13.2 (21)). String is an indefinite type, so the string you’re trying to output does indeed have bounds, and what you are sending is the index of the first character of the string as a 4-byte...

Ada Program Hangs on Exception, gnatmake

ada,gnat

Looks fine and works fine (i.e. raises exception and exits :-) in Debian 8, gcc4.9.1. [email protected]:~/Ada/Play$ gnatmake divide_by_zero.adb gcc-4.9 -c divide_by_zero.adb divide_by_zero.adb:6:19: warning: division by zero divide_by_zero.adb:6:19: warning: "Constraint_Error" will be raised at run time gnatbind -x divide_by_zero.ali gnatlink divide_by_zero.ali [email protected]:~/Ada/Play$ ./divide_by_zero raised CONSTRAINT_ERROR : divide_by_zero.adb:6 divide by zero [email protected]:~/Ada/Play$...

Building Ada Web Server fails

ada,gnat

That version of AWS requires 'gprinstall', so you should compile with GNAT GPL 2015 to get all the needed tools.

What is the difference between the Adacore Gnat version and the “standard” one

ada,gnat

From reading the Debian policy for Ada written by Ludovic Brenta and Stephen Leake: When Ada code is built to produce an executable it is linked with the Ada runtime library. The main difference between the different versions of the GNAT compiler is the license of the Ada runtime library....

Ada for loop isn't doing correct comparison

loops,for-loop,ada,gnat,ada2012

Reset Score to zero at before the start of COMPARE_loop, or else you will be adding or subtracting to the score from the previous candidate. --inner loop to calculate match value by comparing incoming candidate values with voter array values Score := 0; COMPARE_Loop : for J in Integer range...

Can't find GNAT GPS Dependencies Form

ada,gnat

The documentation I found with GNAT GPL 2015 (PDF only, in $prefix/share/doc/gps/pdf) says Edit the dependencies between projects through the contextual Project → Dependencies... menu in the Project view. The “Project view” is the pane on the left hand of the GPS window, click on the “Project” tab. Your project...

Ada compiler chooses incorrect overloaded function

ada,gnat

The line: Timer0.Set_Overflow_At(adc_result_10); Should have been: Timer0.Set_Overflow_At(adc_result_8); I didn't look at the line number in the error message closely enough. Oops....

Maximum size/offset of streamed File using Ada.Streams.Stream_IO.Read

io,filestream,ada,gnat

On Mac OS X, with FSF GCC 5.1.0, there is procedure Read (File : File_Type; Item : out Stream_Element_Array; Last : out Stream_Element_Offset; From : Positive_Count); where type Count is new Stream_Element_Offset range 0 .. Stream_Element_Offset’Last; subtype Positive_Count is Count range 1 .. Count’Last; --' -- Index into file, in...