Compile from stdin

Dawid Dawid
Tue May 6 09:47:18 PDT 2008


Benjamin Schulte Wrote:

> Hi!
> Is there a way to compile a sourcecode from stdin? It would be very helpful to be able to compile a sourcecode from stdin direct into an object file, without saving it first into a temporary file.
> 
> Like using
> type test.d |dmd
> dmd < test.d
> 
> Or is it possible with gdc?
> 

On Linux (and probably some other unixes) you can try:

cat file.d | dmd /proc/self/fd/0

> Thanks in advance.

Hope this will works (haven't tried myself).



More information about the Digitalmars-d mailing list