comp.lang.ada
 help / color / mirror / Atom feed
From: Jere <jhb.chat@gmail.com>
Subject: Re: Package procedure as program entry in GPR project
Date: Fri, 25 Jan 2019 09:05:24 -0800 (PST)
Date: 2019-01-25T09:05:24-08:00	[thread overview]
Message-ID: <04bde116-d1d6-46fe-9c6f-f2ba4b7f4e5b@googlegroups.com> (raw)
In-Reply-To: <9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com>

On Friday, January 25, 2019 at 10:12:24 AM UTC-5, Jesper Quorning wrote:
> Hello All,
> 
> With the package specifikation:
> 
> package My_Program_Package is
>    procedure Program_Entry_Procedure;
> end My_Program_Package;
> 
> How do i make Program_Entry_Procedure as the program entry procedure in a GPR project?
> 
> I think it is possible, but can not find out how.
> 
> I know how to use a stand-alone procedure file as program entry and how to name the executable. 
> 
> 
> Thanks from
> Jesper

With that specific setup, I am not sure.  But if you are willing to change
a couple of things you can do:

-- my_program_package.ads
package My_Program_Package is
   -- Notice no declaration here for the procedure, but you can put other
   -- things if you like
end My_Program_Package; 

-- my_program_package-program_entry_procedure.adb
procedure My_Program_Package.Program_Entry_Procedure is
begin
   -- your main stuff
end My_Program_Package.Program_Entry_Procedure;

Then you modify the GPR file to point to it as the main:
for Main use ("my_program_package-program_entry_procedure.adb");

I do something similar for my Gnoga GUI projects so I can have
program level stuff in the top package but have the main a child
of that top level package.

  reply	other threads:[~2019-01-25 17:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25 15:12 Package procedure as program entry in GPR project Jesper Quorning
2019-01-25 17:05 ` Jere [this message]
2019-01-25 21:42 ` Randy Brukardt
2019-01-26  1:47   ` Jesper Quorning
2019-01-26 12:05   ` Simon Wright
2019-01-26 12:08     ` Simon Wright
replies disabled

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