linking custom modules (dmd)

spir denis.spir at gmail.com
Thu Nov 18 11:51:37 PST 2010


On Thu, 18 Nov 2010 20:01:00 +0900
Mike Parker <aldacron at gmail.com> wrote:

> On 11/18/2010 7:34 PM, spir wrote:
> > Hello,
> >
> > I haven't found the way to have custom modules linked by dmd like stdlib ones. For instance, if program P imports modules M and std.string, I need to manually write a build command like:
> > 	$ dmd -w -ofP P.d M.d
> > What have I missed?
> 
> Nothing. DMD automatically links with Phobos.lib when you compile your 
> app. But it does not automatically compile and link any non-Phobos 
> modules you import unless you explicitly pass them on the command line, 
> as you have done. There's a tool that ships with dmd, called rdmd, that 
> will do what you want if you use it in place of dmd.

Thank you all, now I understand. I will not modify dmd.conf, as imported modules change for every app. But try rdmd when I have for that.

Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com



More information about the Digitalmars-d-learn mailing list