getopt errors

Sebastiaan Koppe via D.gnu d.gnu at puremagic.com
Fri Jan 22 09:57:23 PST 2016


On Friday, 22 January 2016 at 13:03:58 UTC, Johannes Pfau wrote:
> Am Fri, 22 Jan 2016 11:32:30 +0000
> schrieb Sebastiaan Koppe <mail at skoppe.eu>:
>> Thanks. I never know which version of this supports which 
>> version of that. Any easy way of checking this? I mean, how 
>> can I tell that gdc 5.3.0-1 supports phobos 2.066?
>> 
> The best way is running this code snippet:
> ---------------------------------------------------
> import std.compiler;
> import std.stdio;
>
> void main()
> {
>     writefln("%s %s %s.%s (D%s)", name, vendor,
>         version_major,
>         version_minor, D_major);
> }
> ---------------------------------------------------

Why doesn't gdc emit this when called with `--version`?

> Yes, this is really a common problem. I'd say the simplest way 
> to check is trying to compile the code with the matching DMD 
> version (e.g. 2.066.1).

When I have nothing to do I might setup a service that tells you 
in which version a symbol was introduced.

>> What about the other errors though?
>
> Same reason. The old getopt code can't handle the help strings 
> and therefore produces these error messages.

I see, I was mislead due to the errors being in the std code.


More information about the D.gnu mailing list