* Can't get binder “-n” and “-z” options working
@ 2013-04-14 0:23 Yannick Duchêne (Hibou57)
2013-04-14 0:59 ` Yannick Duchêne (Hibou57)
0 siblings, 1 reply; 2+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-04-14 0:23 UTC (permalink / raw)
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?
--
“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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Can't get binder “-n” and “-z” options working
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)
0 siblings, 0 replies; 2+ messages in thread
From: Yannick Duchêne (Hibou57) @ 2013-04-14 0:59 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-14 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox