How to use the -I command line switch?
jmh530
john.michael.hall at gmail.com
Wed Jan 3 15:35:06 UTC 2018
On Wednesday, 3 January 2018 at 12:21:28 UTC, tipdbmp wrote:
> // C:\libs\my_module.d
> module my_module;
> void foo() {}
>
> // main.d
> module main;
> import my_module;
>
> void main() {
> foo();
> }
>
> Running dmd with:
> dmd -IC:\libs main.d my_module.d
>
> I get:
> Error: module my_module is in file 'my_module.d' which
> cannot be read
> import path[0] = C:\libs
> import path[1] =
> path\to\dmd\D\dmd2\windows\bin\..\..\src\phobos
> import path[2] =
> path\to\dmd\D\dmd2\windows\bin\..\..\src\druntime\import
dmd main.d C:\libs\my_module.d
I usually use dub for this type of thing...
More information about the Digitalmars-d-learn
mailing list