Very very noobie question about how imports work.

Chris Wright via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Dec 10 20:09:19 PST 2015


On Fri, 11 Dec 2015 03:20:29 +0000, J Smith wrote:

> How do I make it so that I can import and use the contents of lib.d
> inside of testlib.d.

If you are not compiling everything in one step, the -I flag allows you 
to specify paths to look for imports. For instance:

$ dmd -lib src/package_name/lib.d
$ dmd -Isrc test/testlib.d libpackage_name.a


More information about the Digitalmars-d-learn mailing list