How to compile against GitHub fork of Phobos?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 6 18:30:21 PST 2017


Q. Schroll wrote:

> On Tuesday, 7 March 2017 at 01:45:48 UTC, Adam D. Ruppe wrote:
>> You pass your modified file to the compiler:
>>
>> dmd yourfile.d format.d
>>
>> The format.d there can be a copy of the one from phobos (or a fork or 
>> whatever) and since you passed it explicitly on the command line, it 
>> takes precedence over the one in the library.
>>
>> You still import it as std.format. You can do that with as many modules 
>> as you like.
>
> I just tried it out.
>
> dmd myfile.d phobos/std/format.d
>
> worked fine, but interestingly,
>
> rdmd myfile.d phobos/std/format.d
>
> did not. The latter definitely takes format from the library. I have no 
> idea why.

rdmd doesn't work like dmd. here, it just passing "phobos/std/format.d" as 
command line argument to "myfile.d".


More information about the Digitalmars-d-learn mailing list