Compiling D through command line

Bauss streetzproductionz at hotmail.com
Fri Mar 7 09:21:28 PST 2014


On Friday, 7 March 2014 at 17:08:24 UTC, Rene Zwanenburg wrote:
> On Friday, 7 March 2014 at 16:59:30 UTC, Bauss wrote:
>> What arguments would I do to compile a d project through 
>> command line. Been trying a few things, but can't get it 
>> working.
>>
>> I always get "Error: cannot read file x"
>>
>> Read around the net and it most says it's an installation 
>> error and that reinstalling should fix it, but it works when 
>> compiling through a few IDE's so I assume it's mistake of my 
>> own.
>>
>> Tried like this:
>> -c c:\testproject\main.d -m32 -ofc:\testd\out.exe
>>
>> And tried doing -v and it shows the correct information.
>>
>> Anyone who got an example to achieve it. The documents doesn't 
>> explain it proper IMO as there is no example on compiling 
>> manual.
>
> I've not used dmd directly in ages, rdmd [1] is easier to use. 
> It's included in the installation. Does that work for you?
>
> http://dlang.org/rdmd.html

Nope still get the same compile error.
Compiling as such:
--build-only --force -ofc:\testd\out.exe c:\testproject\main.d

I'm sure I do it wrong.


More information about the Digitalmars-d-learn mailing list