How do I set the output directory for rdmd (Windows)?
I know that in dmd it can be done like this:
> cd ..\bin
> dmd ..\src\example.d
or like this:
> dmd example.d -offilename ..\bin\example.exe
But in rdmd these methods don't work. The file "example.exe" always appears in the same folder with "example.d".
I tried to do this
> rdmd --build-only example.d ..\bin\example.exe
this
> rdmd --build-only example.d -offilename ..\bin\example.exe
and this one
> cd ..\bin && rdmd --build-only ..\src\example.d
with the same negative result.
source to share
You received incorrect syntax -offilename
. filename
is the sample value. You need to replace him -of..\bin\example.exe
. Many other dmd options work the same way.
Also, rdmd does not pass arguments that come after the source file to dmd. They are interpreted as arguments to the program that is built and run (regardless of --build-only
). This means that before example.d
you need to put -of..\bin\example.exe
:
rdmd --build-only -of..\bin\example.exe example.d
source to share