comp.lang.ada
 help / color / mirror / Atom feed
* Can't create executable file.
@ 2014-03-06  8:35 oktawian.lagiewski
  2014-03-06  8:41 ` Dmitry A. Kazakov
  2014-03-06 20:45 ` Robert A Duff
  0 siblings, 2 replies; 3+ messages in thread
From: oktawian.lagiewski @ 2014-03-06  8:35 UTC (permalink / 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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-06 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-06  8:35 Can't create executable file oktawian.lagiewski
2014-03-06  8:41 ` Dmitry A. Kazakov
2014-03-06 20:45 ` Robert A Duff

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