List installed modules

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sun Mar 11 01:55:07 UTC 2018


On Sunday, March 11, 2018 01:04:27 Roberto via Digitalmars-d-learn wrote:
> How do I list installed modules?
>
> dmd --list-modules
> datefmt
> dateparser
> std.algorithm
> std.array
> std.conv
> std.datetime
> std.digest
> std.exception
> std.file
> std.format
> std.getopt
> std.json
> std.math
> ...

The compiler has no concept of installed modules any more than C/C++ has a
concept of installed header files. It has paths that it looks in for modules
when it's told to import them, but it doesn't know or care about any modules
until they're explicitly imported. If you want to see the default import
path, then look at dmd.conf and what it passes to the -I flag. Otherwise,
it's a question of where dmd is run from and what additional -I flags the
build process passes to dmd.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list