gnat

How to bind to OpenCV for GNAT?

余生长醉 提交于 2019-12-18 09:08:46
问题 Can anybody tell me how to find or create a binding to OpenCV for GNAT? I want to use Ada2005 to implement some program with OpenCV (1.0 or 2.X), but I don't know how. Can anybody teach me how to do it? 回答1: Teaching you how to create a binding to a complex library is beyond the scope of StackOverflow, but you might start with this tutorial. Then study the relevant GNAT library sources, e.g. Ada.Numerics , and other existing Ada bindings. Among others, Ada 2005 Math Extensions and An Ada

How to bind to OpenCV for GNAT?

别等时光非礼了梦想. 提交于 2019-12-18 09:08:17
问题 Can anybody tell me how to find or create a binding to OpenCV for GNAT? I want to use Ada2005 to implement some program with OpenCV (1.0 or 2.X), but I don't know how. Can anybody teach me how to do it? 回答1: Teaching you how to create a binding to a complex library is beyond the scope of StackOverflow, but you might start with this tutorial. Then study the relevant GNAT library sources, e.g. Ada.Numerics , and other existing Ada bindings. Among others, Ada 2005 Math Extensions and An Ada

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

南笙酒味 提交于 2019-12-13 05:02:23
问题 I have this Ada code. with Ada.Text_IO; use Ada.Text_IO; procedure for_Loop is begin for Counter in 'A'..'Z' loop Put(Counter); end loop; New_Line; end for_Loop; The Ada compiler (gnatmake) outputs these error message. gcc -c for_loop.adb for_loop.adb:6:24: ambiguous character literal for_loop.adb:6:24: possible interpretation: Character for_loop.adb:6:24: possible interpretation: Wide_Character for_loop.adb:6:24: possible interpretation: Wide_Wide_Character gnatmake: "for_loop.adb"

gnatbind: Cannot find: s-stalib.ali

僤鯓⒐⒋嵵緔 提交于 2019-12-11 20:22:25
问题 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 options Added /usr/local/gnat/bin to $PATH After trying to compile a simple hello world example I get this error: $ gnat make hello gcc -c hello.adb gnatbind -x hello.ali gnatbind: Cannot find: s-stalib.ali gnatmake: *** bind failed. Any idea why this might happen? PS: gnat make -a hello works, but

Two copies of constant appearing in the compiled Elf

纵然是瞬间 提交于 2019-12-11 15:06:09
问题 We are basically using sparc architecture and our language is Ada we are using gnat compiler to compile our code. We observed something funny. Some of the constant in our code are having two or more copies. file.adb: With FileConsts; USE FileConsts Procedure SomeProcedure is A : LONG_FLOAT; Begin A := cSomeConstant; End SomeProcedure; FileConsts.ads cSomeConstant : CONSTANT LONG_FLOAT := 100.0; In the Map file we have basically .rodata 0x40010000 (0x8)file.o .rodata 0x40010008 pfileconsts_

CONSTRAINT_ERROR on reading a file containing “[”

为君一笑 提交于 2019-12-11 10:38:22
问题 I am reading a simple text file. Everything works as it should, except when an open bracket ("[") character is encountered. Then I get a CONSTRAINT_ERROR. My function is: ---------------------------------------------- -- GET_FILE_CONTENTS function Get_File_Contents (File_Name : in String) return String_Array is -- Loads the entire file into a dynamically sized -- array of Unbounded_Wide_String. -- The line count is used to dynamically size the array. Line_Count : Natural := 0; File : Ada.Wide

Cannot find -lgfortran though gfortran is installed [duplicate]

心已入冬 提交于 2019-12-11 02:21:35
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: lgfortran not found I must admit that my question can be considered to be very similar to lgfortran not found, but as I am a newbie in Linux I need more help and I couldn't find what I am looking for in the above post. I have a fresh linux mint Debian edition installed and I am trying to make a lapack binding for Ada to work. If I check for gfortran, I get: gfortran-4.6 -v Using built-in specs. COLLECT_GCC

Ada beginner Stack program

淺唱寂寞╮ 提交于 2019-12-11 02:14:42
问题 Basically, I have 2 files ( .adb and .ads). I am totally new to Ada and also how to compile 2 files. The program is of a basic stack implementation. I got this compile error when I compiled the .adb file. $ gcc -c test_adt_stack.adb abstract_char_stack.ads:22:01: end of file expected, file can have only one compilation unit The 2 files I have are: abstract_char_stack.ads ----------------------------------------------------------- package Abstract_Char_Stack is type Stack_Type is private;

Can't make Ada work with Xcode 3.2

北城以北 提交于 2019-12-11 01:37:05
问题 I've been looking around the web for an hour and I'm just giving up to ask it here... I've got to work under Ada. I managed to make gnat work as a command line to compile my files. But I want to be able to have proper projects in Xcode. My problem is that I've found some templates on the to make ada default templates, I've copy pasted them a bit everywhere (/library/developer/ application support etc) but they never appear in the list when I want to create a project. My other problem is that

Extracting record from big endian data

空扰寡人 提交于 2019-12-10 17:35:48
问题 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 Ada.Unchecked_Conversion; with Ada.Text_IO; use Ada.Text_IO; with System; use System; procedure Bit_Extraction is type Byte is range 0 .. (2**8)-1 with Size => 8; type Command is (Read_Coils, Read_Discrete_Inputs ) with Size => 7; for Command use (Read_Coils => 1, Read_Discrete_Inputs => 4); type