comp.lang.ada
 help / color / mirror / Atom feed
From: oktawian.lagiewski@gmail.com
Subject: Can't create executable file.
Date: Thu, 6 Mar 2014 00:35:04 -0800 (PST)
Date: 2014-03-06T00:35:04-08:00	[thread overview]
Message-ID: <87d943b8-5907-4d0f-9e80-e3c99402472c@googlegroups.com> (raw)

When i use gcc - program.adb i get two new files (ali and o). I wanted to create
executable so i typed gnatbind program but i get message:

"program.adb:1: Program cannot be used as a main program.
Help me please, I'm trying to learn but there is not much info about command prompt compiling. Below is the code for .adb and .ads :

--program.adb

with Ada.Text_IO;
use Ada.Text_IO;

Package body Program is

	procedure program2 is

		begin
		Put_Line ("to jest program!");
	
	end program2;

	function testy(A: in out Integer)return Integer is
		Average: Integer;
		begin
		Average:= 2*A;
		Put_Line("A is equal to: " & Integer'Image(Average));
		return Average;
	end testy;

end program;




-------------------------------------------

--program.ads

package program is

	procedure program2;

	function testy(A: in out integer) return Integer;

end program;

             reply	other threads:[~2014-03-06  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06  8:35 oktawian.lagiewski [this message]
2014-03-06  8:41 ` Can't create executable file Dmitry A. Kazakov
2014-03-06 20:45 ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox