rdmd problem

Comrad comrad.karlovich at gmail.com
Fri Apr 5 12:20:15 UTC 2019


On Monday, 1 April 2019 at 18:27:41 UTC, Andrei Alexandrescu 
wrote:
> On 4/1/19 7:23 AM, Andre Pany wrote:
>> I am not sure wheter compiler arguments works at the shebang 
>> line.
>
> Yah, that's the problem. I added the option --shebang 
> (https://dlang.org/rdmd.html) for that reason, OP can you 
> please try that?

So...
I was able finally to make it work:
> cat test.d
#!/usr/bin/rdmd --shebang -version=test -O
import std.stdio;
void main()
{
     writeln("Hello, world with automated script running!");
}
------------------------------------

This does work. But!!! The documentation have to be changed, 
because the recommended way to start the script is through `env` 
and it doesn't help at all.
Maybe I'm stupid, but it took for me some time to understand such 
an obvious (like it appeared to be later) thing.


More information about the Digitalmars-d mailing list