Hello,

I have a main.d file which looks like this;

import somepackage.somemodule;

void main()
{
        printSomething();
}


Next to maind.d I have a directory 'somepackage' with a file inside called 'somemodule.d' which looks like this;

void printSomething()
{
        import std.stdio : writeln;

        "Hello".writeln;
}

Inside the main.d's folder I type;

dmd main.d somepackage/somemodule.d

and I get the following error message;
main.d(1): Error: module somemodule from file somepackage/somemodule.d must be imported with 'import somemodule;'

But I'm failing to understand why?

Thanks!


Reply via email to