digitalmars.D.learn - linking custom modules (dmd)
- spir (10/10) Nov 18 2010 Hello,
- Mike Parker (6/10) Nov 18 2010 Nothing. DMD automatically links with Phobos.lib when you compile your
- Jesse Phillips (2/4) Nov 18 2010 Well, not really automatic, the dmd.conf/sc.ini file is read by dmd, and...
- spir (10/22) Nov 18 2010 b ones. For instance, if program P imports modules M and std.string, I n...
- Steven Schveighoffer (4/10) Nov 18 2010 http://www.digitalmars.com/d/2.0/dmd-linux.html#dmd_conf
Hello, I haven't found the way to have custom modules linked by dmd like stdlib on= es. 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? Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.com
Nov 18 2010
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.
Nov 18 2010
Mike Parker Wrote:Nothing. DMD automatically links with Phobos.lib when you compile your app.Well, not really automatic, the dmd.conf/sc.ini file is read by dmd, and can be edited for other libraries/files/commands.
Nov 18 2010
On Thu, 18 Nov 2010 20:01:00 +0900 Mike Parker <aldacron gmail.com> wrote:On 11/18/2010 7:34 PM, spir wrote:b ones. For instance, if program P imports modules M and std.string, I need= to manually write a build command like:Hello, I haven't found the way to have custom modules linked by dmd like stdli=Thank you all, now I understand. I will not modify dmd.conf, as imported mo= dules change for every app. But try rdmd when I have for that. Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.com$ dmd -w -ofP P.d M.d What have I missed?=20 Nothing. DMD automatically links with Phobos.lib when you compile your=20 app. But it does not automatically compile and link any non-Phobos=20 modules you import unless you explicitly pass them on the command line,=20 as you have done. There's a tool that ships with dmd, called rdmd, that=20 will do what you want if you use it in place of dmd.
Nov 18 2010
On Thu, 18 Nov 2010 05:34:39 -0500, spir <denis.spir gmail.com> 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?http://www.digitalmars.com/d/2.0/dmd-linux.html#dmd_conf Add stuff to this file if you want dmd to automatically link your libs. -Steve
Nov 18 2010