Compile from stdin

BCS ao at pathlink.com
Thu May 8 13:48:00 PDT 2008


Reply to Walter,

> BCS wrote:
> 
>> Reply to Walter,
>> 
>>> BCS wrote:
>>> 
>>>> Walter: any way we can get a "don't adjust the filename" flag?
>>>> 
>>> I don't know what you mean.
>>> 
>> this:
>> 
>> dmd foo
>> 
>> looks for a file named "foo.d", I need to to look for "foo"
>> 
> Are you using linux or windows?

linux

> Also, dmd looks at the file extension
> to see what to do with the file. .o means object file, .a means
> library, etc. Having no extension causes problems. 

something like -iD / -iL / -iO flags would cover that. But I think that only 
source code would be used very often so making that the default would be 
reasonable in my book.

using the unix convention of - refering to stdin would cover what the OP 
wanted:

dmd -iD-

> Why not just put an extension on it?
> 

Because I can't select the filename. I was trying to use the "<(command)" 
construct under bash. This replaces the given with a path to a named pipe 
that the given command's stdout can be accessed from. The name is not something 
I can effect.





More information about the Digitalmars-d mailing list