rdmd problem

Seb seb at wilzba.ch
Fri Apr 5 13:22:26 UTC 2019


On Friday, 5 April 2019 at 12:46:18 UTC, Andre Pany wrote:
> On Friday, 5 April 2019 at 12:27:25 UTC, Comrad wrote:
>> [...]
>
> No problem:)
>
> Create a file sample.d with following content
>
> #!/usr/bin/env dub
> /+ dub.sdl:
>   name "sample"
>   versions "test"
> +/
> void main() {
> 	import std.stdio : writeln;
> 	writeln("Hello, World!");
> }
>
> You can start it with "dub sample" or if you add the executable 
> flag with "./sample.d".
>
> With recent dub version you can name the file even without the 
> .d extension and just start it with "./sample".
>
> Kind regards
> Andre

Also, in more recent versions of dub the "name" field got 
optional as well and will be automatically inferred if not set.


More information about the Digitalmars-d mailing list