getopt errors

Johannes Pfau via D.gnu d.gnu at puremagic.com
Fri Jan 22 02:06:01 PST 2016


Am Thu, 21 Jan 2016 12:06:18 +0000
schrieb Sebastiaan Koppe <mail at skoppe.eu>:

> This code:
> 
> 	bool time;
> 	string fileIn;
> 	string fileOut;
> 
> 	auto helpInformation = getopt(
> 		args,
> 		"time", "Show timing information", &time,
> 		"i|input", "Input file (defaults to stdin)", &fileIn,
> 		"o|output", "Output file (defaults to stdout)",
> &fileOut );
> 
> 	if (helpInformation.helpWanted)
> 	{
> 		defaultGetoptPrinter("ECMAScript 5 
> minifier.\n\nUsage:\t"~baseName(args[0])~" 
> [OPTIONS]\n\nOptions:\n", helpInformation.options);
> 		return 1;
> 	}
> 

defaultGetoptPrinter is not yet available in the phobos version
used by GDC. GDC uses phobos version 2.066, defaultGetoptPrinter was
added in 2.067.


More information about the D.gnu mailing list