How to compile against GitHub fork of Phobos?

Q. Schroll via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 6 18:34:48 PST 2017


On Tuesday, 7 March 2017 at 02:30:21 UTC, ketmar wrote:
> 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".

You're right. I should've known that. By bad ...

Thanks for your replies. They were very helpful.


More information about the Digitalmars-d-learn mailing list