www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - rdmd executable location

reply CrypticMetaphor <CrypticMetaphor88 gmail.com> writes:
Hello, I'm having a bit of trouble with rdmd. rdmd puts the executable 
in a temp folder, even with the --build-only option. Maybe this is a 
silly question but, how can I compile with rdmd so I get the executable 
in the folder I am  currently at?

other info: I'm programming in Windows XP with dmd version 2.50
Dec 15 2010
next sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Try rdmd -od%cd% filename.d

On 12/15/10, CrypticMetaphor <CrypticMetaphor88 gmail.com> wrote:
 Hello, I'm having a bit of trouble with rdmd. rdmd puts the executable
 in a temp folder, even with the --build-only option. Maybe this is a
 silly question but, how can I compile with rdmd so I get the executable
 in the folder I am  currently at?

 other info: I'm programming in Windows XP with dmd version 2.50

Dec 15 2010
parent reply CrypticMetaphor <CrypticMetaphor88 gmail.com> writes:
If I run it with the rdmd version that came with the compiler, nothing 
special happens, it just compiles and runs the code, the executable 
doesn't end up in my current folder. ( rdmd build 20100913 ).

If I run it with the compiler version of this code (rdmd build 20101215):
http://dsource.org/projects/phobos/browser/trunk/tools/rdmd.d

I get an assertion error on line 51, so that doesn't work either.
Dec 15 2010
parent CrypticMetaphor <CrypticMetaphor88 gmail.com> writes:
 Sorry, that should be:

 rdmd -od%cd%\ filename.d

 Notice the backslash there. Otherwise it will create an executable on
 the root drive with the name of the folder you're compiling in.
 Funky..

 Anyway there are more switches here:
 http://www.digitalmars.com/d/2.0/dmd-windows.html#switches

Now that you mentioned it, I did find the executable one folder above where I executed rdmd :P, but what you wrote works, yay. Thanks!
Dec 15 2010
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 12/15/10, CrypticMetaphor <CrypticMetaphor88 gmail.com> wrote:
 If I run it with the rdmd version that came with the compiler, nothing
 special happens, it just compiles and runs the code, the executable
 doesn't end up in my current folder. ( rdmd build 20100913 ).

Sorry, that should be: rdmd -od%cd%\ filename.d Notice the backslash there. Otherwise it will create an executable on the root drive with the name of the folder you're compiling in. Funky.. Anyway there are more switches here: http://www.digitalmars.com/d/2.0/dmd-windows.html#switches
Dec 15 2010
prev sibling parent reply "Nick Voronin" <elfy.nv gmail.com> writes:
try -of option.

On Wed, 15 Dec 2010 21:59:32 +0300, CrypticMetaphor  
<CrypticMetaphor88 gmail.com> wrote:

 Hello, I'm having a bit of trouble with rdmd. rdmd puts the executable  
 in a temp folder, even with the --build-only option. Maybe this is a  
 silly question but, how can I compile with rdmd so I get the executable  
 in the folder I am  currently at?

 other info: I'm programming in Windows XP with dmd version 2.50

-- Using Opera's revolutionary email client: http://www.opera.com/mail/
Dec 15 2010
parent CrypticMetaphor <CrypticMetaphor88 gmail.com> writes:
On 12/15/2010 8:58 PM, Nick Voronin wrote:
 try -of option.

rdmd -ofmain main.d works too! Thanks :P
Dec 15 2010