www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - RDMD - source - change

reply eddy1985 <eddy1985 tlen.pl> writes:
Hello 

I found recently (http://www.algonet.se/~afb/d/rdmd.d) rdmd source and a 
little bit changed of curiosity if work with for example GPP. When I run 
changed RDMD with *.cpp file then display on console: "/usr/bin/ld: cannot 
open output file d/tmp/: No such file or directory/collect2: ld returned 1 
exit status". Is there any possibility of changing source of rdmd that support 
other than D Language ??
Apr 25 2007
parent reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
eddy1985 wrote:

 I found recently (http://www.algonet.se/~afb/d/rdmd.d) rdmd source and a 
 little bit changed of curiosity if work with for example GPP. When I run 
 changed RDMD with *.cpp file then display on console: "/usr/bin/ld: cannot 
 open output file d/tmp/: No such file or directory/collect2: ld returned 1 
 exit status". Is there any possibility of changing source of rdmd that support 
 other than D Language ??

It should answer "rdmd: Couldn't find any D source code file to compile or execute." Mostly because the syntax only works with the DMD compiler or the gdmd wrapper to GDC, it could probably be made to work with GCC too and allow .c and .cpp files but this was not in the original spec... Anyway, gcc and g++ write their program to "a.out", unless using -o. It also need to be modified (either the compiler or the sources) to allow the shebang, or you'll get "invalid preprocessing directive #!" --anders
Apr 25 2007
parent reply eddy1985 <eddy1985 tlen.pl> writes:
I make it -- its working :)

RDMD compile source of *.cpp file with aim GPP
and launch compiled app. from temporary directory
(RDMD recompile when need) 

Anders F Björklund Wrote:

 eddy1985 wrote:
 
 I found recently (http://www.algonet.se/~afb/d/rdmd.d) rdmd source and a 
 little bit changed of curiosity if work with for example GPP. When I run 
 changed RDMD with *.cpp file then display on console: "/usr/bin/ld: cannot 
 open output file d/tmp/: No such file or directory/collect2: ld returned 1 
 exit status". Is there any possibility of changing source of rdmd that support 
 other than D Language ??

It should answer "rdmd: Couldn't find any D source code file to compile or execute." Mostly because the syntax only works with the DMD compiler or the gdmd wrapper to GDC, it could probably be made to work with GCC too and allow .c and .cpp files but this was not in the original spec... Anyway, gcc and g++ write their program to "a.out", unless using -o. It also need to be modified (either the compiler or the sources) to allow the shebang, or you'll get "invalid preprocessing directive #!" --anders

May 02 2007
parent =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
eddy1985 wrote:

 I make it -- its working  :) 
 
 RDMD compile source of *.cpp file with aim GPP
 and launch compiled app. from temporary directory
 (RDMD recompile when need) 

Do you have any code you want to share, so that it might make it into future DMD/GDC releases ? (you will also need to release all your changes into the Public Domain so they can be included) Not that compiling C/C++ is a high priority for a D wrapper, but if it works - why not... (both DMD and GDC requires the C compiler installed anyway, so it's usually around) --anders
May 03 2007