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 Path: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: =?utf-8?B?Q2FuJ3QgZ2V0IGJpbmRlciDigJwtbuKAnSBhbmQg4oCcLXrigJ0gb3B0aW8=?= =?utf-8?B?bnMgd29ya2luZw==?= Date: Sun, 14 Apr 2013 02:59:22 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: xFxgxQb2AjkXFvbhYzCppw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 2803 Xref: number.nntp.dca.giganews.com comp.lang.ada:181053 Date: 2013-04-14T02:59:22+02:00 List-Id: Le Sun, 14 Apr 2013 02:23:12 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > Hi, > > I must be stupid in some way and that must be simple, I already did th= is = > some long time ago, but I can't get it working any=E2=80=91more. I nee= d to use = > an external C main entry point, but both the =E2=80=9C-n=E2=80=9D and = =E2=80=9C-z=E2=80=9D options added = > to Default_Switches in the Binder package in my GPR file, seems to hav= e = > no effect at all, building with gprbuild. > > If I remove my custom main sub=E2=80=91program, I should get an error = at link = > time, but it don't. If I explicitly adds the object which contains the= = > custom main sub=E2=80=91program to the linker options, I get a link er= ror due to = > main being defined two times. > > These options are still supported, isn't it? Is there a known bug with= = > these option or is it me missing something stupid? As soon posted, as soon solved. I was just confused by a second utility program (a C one) built by the = same GPR file, with something like `for Main use ("app1", "app2");`. = That's solved now, I removed the second program, so that its own main = entry point does not get unfortunately used. By the way, only `-n` is required here. This works with the combination = of = `-n` and `-z` together, but that's not the purpose of `-z`, as if it wor= ks = the two are combined, that's just the `-n` option defeating the `-z` = option, which should not be used for the purpose of having an external = main entry point. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity