From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Can't get binder “-n” and “-z” options working
Date: Sun, 14 Apr 2013 02:59:22 +0200
Date: 2013-04-14T02:59:22+02:00 [thread overview]
Message-ID: <op.wviac8ucule2fv@cardamome> (raw)
In-Reply-To: op.wvh8oyxbule2fv@cardamome
Le Sun, 14 Apr 2013 02:23:12 +0200, Yannick Duchêne (Hibou57)
<yannick_duchene@yahoo.fr> a écrit:
> Hi,
>
> I must be stupid in some way and that must be simple, I already did this
> some long time ago, but I can't get it working any‑more. I need to use
> an external C main entry point, but both the “-n” and “-z” options added
> to Default_Switches in the Binder package in my GPR file, seems to have
> no effect at all, building with gprbuild.
>
> If I remove my custom main sub‑program, I should get an error at link
> time, but it don't. If I explicitly adds the object which contains the
> custom main sub‑program to the linker options, I get a link error 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 works
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.
--
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University
prev parent reply other threads:[~2013-04-14 0:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 0:23 Can't get binder “-n” and “-z” options working Yannick Duchêne (Hibou57)
2013-04-14 0:59 ` Yannick Duchêne (Hibou57) [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox