request for help on gnat ada95 compilation problem
Harvinder Singh Gill
hs.gill@operamail.com
Mon Apr 10 19:19:00 GMT 2000
Dear sir,
I have started to learn Ada95 language. I have the GNAT Ada95 complier version
3.11 p. I have the executable self installing file for Windows 95/NT. I
installed it in D: partition of the hard disk because there was less space in
c: drive. The autoexec.bat file has the path updated to include d:\gnat\bin.
The compiler was installed without any error messages and problems.
PROBLEM:
The ADAGIDE.exe file though functioning is not compliling even the simplest
hello world example.
INPUT FILE:
-- Print a simple message to demonstrate a trivial Ada program.
with Ada.Text_IO;
use Ada.Text_IO; -- use clause - automatically search Ada.Text_IO.
procedure Hello2 is
begin
Put_Line("Hello, world!"); -- Note: No longer has Ada.Text_IO" in front.
end Hello2;
COMPILE RESULT:
Compiling ...
\cca 929941.s No such file or directory
gnat1.exe:
Completed.
*** MY OBSERVATION: each attempt to compile the program gives the same result
except that the numbers in \cca #####.s are always different, though always
5 digits long.
BUILD RESULT:
GNATMAKE 3.11p (981118) copyright 1995-1998 Free Software Foundation, Inc.
"hello2.ali" being checked...
->"hello2.ali" missing
gcc -c -Id:\gnat\lovelace\ -gnatwu -gnatx2 -gnato -g -I-
d:\gnat\lovelace\hello2.adb
\cca 70541.s: No such file or directory
gnat1.exe: gnatmake: "d:\gnat\lovelace\hello2.adb" compilation error
Completed
*** MY CONCLUSION: I thought that the compiler was not able to find the RTL.
So to check this I removed the Ada.Text_IO references from the hello2.adb
file. But this yielded the same errors on compliation. So I copied the file to
d:\gnat\examples and compiled again but got the same results. Then I tried
manual compilation after reading the Gnat User's Guide. The reults of manual
compilation are as under :
step 1: gcc -c hello2.adb
result : gnat1.exe \cca73149.s No such file or directory
step 2: gnat1 hello2.adb
result : the compiler makes "hello2.ali" and "hello2.s" files.
step 3: gcc -c hello2.adb
result : gnat1.exe \cca73149.s No such file or directory
step 4: gcc -c hello2.s
result : "hello2.o" file is produced.
step 5: gnatbind hello2.ali
result : no file generated and no error messages generated.
step 6: gnatlink hello2.ali
result: cpp.exe: Usage: d:\GNAT\lib\gcc-lib\pentium-mingw32msv\2.8.1\cpp.exe
[switches] input output
I do not have any knowledge of the switches to be used with cpp.exe. I am new
to GNAT compiler and the gcc compiler. I have tried to read the documentation
but could not find info to resolve this problem. Kindly help me out and give
suggestions to produce the exe files.
Also I believe something is wrong with either my environment or the adagide
file since it is not compiling the input files.
Kindly advice. The autoexec.bat file of my system is given below
______________________________________________________________________________
____________
@C:\PROGRA~1\GRISOFT\AVG6\bootup.exe
C:\PROGRA~1\QUICKH~1\QHSTRUP.EXE
@echo off
prompt $p$g
path=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\dos;c:\winrar;d:\unzip;d:\lha;C:\PROGRA~
1\GRISOFT\AVG6
set path=C:\jdk1.2.1\bin;%path%
set TMP=C:\WINDOWS\TEMP
rem - By Windows Setup - C:\WINDOWS\COMMAND\MSCDEX.EXE /D:MSCD001 /V /M:8
doskey
SET PATH=D:\GNAT\BIN;C:\PROGRA~1\MTS;%PATH%
______________________________________________________________________________
___________
System configuration is:
pentium-II 233 Mhz
128 mb ram
windows-95
kindly advice.
thanking you in advance.
p.s
i have also downloaded the gnat ver 3.12p hoping that the problem would be
solved by it. But the same problem persists with it too.
More information about the Gcc-help
mailing list