From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:a945:: with SMTP id x5mr6236113iti.26.1548435924804; Fri, 25 Jan 2019 09:05:24 -0800 (PST) X-Received: by 2002:a05:6830:104c:: with SMTP id b12mr29022otp.7.1548435924632; Fri, 25 Jan 2019 09:05:24 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no294818itb.0!news-out.google.com!v71ni392ita.0!nntp.google.com!q69no294812itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 25 Jan 2019 09:05:24 -0800 (PST) In-Reply-To: <9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 References: <9c44582e-faff-4498-88e1-c8715471e857@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <04bde116-d1d6-46fe-9c6f-f2ba4b7f4e5b@googlegroups.com> Subject: Re: Package procedure as program entry in GPR project From: Jere Injection-Date: Fri, 25 Jan 2019 17:05:24 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:55370 Date: 2019-01-25T09:05:24-08:00 List-Id: 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.