From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,15085f27dfa8e21a,start X-Google-Attributes: gid103376,public From: Matthew Kennedy Subject: Trouble getting started with GNAT for Win95/NT Date: 1997/05/24 Message-ID: <3386D256.CD2@mail.connect.usq.edu.au>#1/1 X-Deja-AN: 243578888 Organization: University of Southern Queensland Reply-To: q957722@mail.connect.usq.edu.au Newsgroups: comp.lang.ada Date: 1997-05-24T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------6C5A59B95E88 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello all, (My Ada learning is coming along very nicely, but...) I've been using GNAT for DOS and now I would like to try out GNAT for Win95/NT - I use Win95. However when I install it and try to compile any of my creations, I get this error (by the way, I included the specific example 'state.adb' as an attachment): c:\usr >gnatmake state.adb gcc -c state.adb state.adb:11:06: "Ada.Numerics.Discrete_Random" is not a predefined library unit compilation abandoned gnatmake: "state.adb" compilation error c:\usr > I had no such trouble when using GNAT DOS. Here are some of my installation details and things I have tried. 1. I use a 486DX4, 24Mb RAM, plenty of hard drive, compilation occurs in a Win95 DOS box. I have tried a 'typical' installation and I have also tried a 'custom' installation with all option checked. Result: same error. 2. Environment variables set: ADA_INCLUDE_PATH=C:\USR\LOCAL\ADAINCLUDE ADA_OBJECTS_PATH=C:\USR\LOCAL\LIB\GCC-LIB\I386-PC-CYGWIN32\2.7.2\ADALIB PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DOS;C:\USR\BIN;C:\USR\LOCAL\LIB\GCC-LIB\I386-PC-CYGWIN32\2.7.2\;C:\USR\EMACS-19.34\BIN LFN=Y 3. Things I've thought of: In my DOS installation, I noticed that my ADA_OBJECTS_PATH (which has all the .ALI file in it) also had .O files as well - my Win95 GNAT installation only has .ALI files in the ADA_OBJECTS_PATH. Have I forgoten to download an archive full of .O files? Also is my compilation command correct (gnatmake state.adb)? Should there be any extra linker options as well? Thank you all, Matt. -- Matthew Kennedy Student of Electronics Engineering, USQ Australia " Hey pig, nothing's turning out the way I planned " - Nine Inch Nails Hell yeah! This just proved it! --------------6C5A59B95E88 Content-Type: text/plain; charset=us-ascii; name="state.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="state.adb" -- -- STATE.ADB -- -- Program to illustrate a state driven approach to determining the -- parity of continuous bit stream. -- -- Program also illustrates how to implement a new package based on -- a previously defined generic package. -- with Ada.Numerics.Discrete_Random; with Ada.Text_IO; use Ada.Text_IO; procedure State is type Parity is (Odd, Even); type Bit is (Set, Clear); package Random_Bit is new Ada.Numerics.Discrete_Random(Bit); package Parity_IO is new Ada.Text_IO.Enumeration_IO(Parity); package Bit_IO is new Ada.Text_IO.Enumeration_IO(Bit); use Random_Bit; use Parity_IO; use Bit_IO; State : Parity := Odd; Input : Bit; G : Generator; begin for I in 1..10 loop Input := Random(G); case State is when Even => if Input = Set then State := Odd; end if; when Odd => if Input = Set then State := Even; end if; end case; Put(Input, Width => 8); Put(State, Width => 5); New_Line; delay 1.0; end loop; end State; --------------6C5A59B95E88--