BUG: rdmd cmd line argument bug

Walter Bright newshound at digitalmars.com
Fri Jun 2 12:17:53 PDT 2006


Bruno Medeiros wrote:
> Hum, I found it does work after all, but only when called from the 
> Windows Command prompt! If I call it from a MinGW shell I get an error 
> (which was what originally made think one wasn't supposed to use -run). 
> Substituting dmd for the very printargs.exe, here's what is found:
> 
> When one runs rdmd from the Win CMD shell:
> 
>  > rdmd dummy.d
> ARGS: 5 
> [C:\devel\D.tools\dmd\bin\dmd.exe,-quiet,dummy.d,-ofc:\Home\phoenix\
> LOCALS~1\Temp\dummy-phoenix-0-0-A46C236CDE107E3B9F053881E4257C2D.exe,-odc:\H 
> 
> ome\phoenix\LOCALS~1\Temp\]
> 
> (DMD would run fine)
> But when one runs rdmd from the MinGW bash shell:
> 
> $ rdmd dummy.d
> ARGS: 5 
> [c:\devel\D.tools\dmd\bin\dmd.exe,-quiet,dummy.d,-ofc:/Home/phoenix/
> LOCALS~1/Temp\dummy-phoenix-0-0-A46C236CDE107E3B9F053881E4257C2D.exe,-odc:/H 
> 
> ome/phoenix/LOCALS~1/Temp\]
> 
> Some of the slashes are inverted, and that makes OPTLINK choke. Weird. 
> How does rdmd have this different behaviour, I mean, how does it even 
> know it's running under a different shell/environ/whatever? :/

It doesn't know. The mingw shell is buggy. It doesn't follow Windows 
conventions, and so screws up programs that do. I've gotten numerous 
mysterious bug reports over the years that eventually got traced back to 
the mingw shell. Stop using it, and the problems disappear <g>.



More information about the Digitalmars-d-bugs mailing list