This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

compile time error in gnat-ada95

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.


	The ADAGIDE.exe file though functioning is not compliling even 	the simplest 
hello world example.

	-- 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
	Put_Line("Hello, world!"); -- Note: No longer has Ada.Text_IO" in front.
	end Hello2;

	Compiling ...
	\cca 929941.s No such file or directory

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.

	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- 
	\cca 70541.s: No such file or directory
	gnat1.exe: gnatmake: "d:\gnat\lovelace\hello2.adb" compilation error

***	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


@echo off
prompt $p$g
set path=C:\jdk1.2.1\bin;%path% 
rem - By Windows Setup - C:\WINDOWS\COMMAND\MSCDEX.EXE /D:MSCD001 /V /M:8


System configuration is:

pentium-II 233 Mhz
128 mb ram

Thinking that there might be some problem with the gnat-3.11p version while 
downloading, i downloaded the newer gnat-3.12p also.
However, the same problem continues.

kindly advice. i am desperate to try out ada programming.

thank you for your time

Harvinder Singh Gill

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]