I am facing an issue compiling an hello world program using dmd v2.096.1 running on WSL2 debian.
I wrote the basic code:
void main() {
import std.studio;
string name ;
write("What is your name?");
readf("%s\n", &name);
writeln("Hellow ", name);
}
This throws the following no compiling:
$ dmd hellow.d 21:16:13
hellow.d(2): Error: module `studio` is in file 'std/studio.d' which cannot be read
import path[0] = /usr/include/dmd/phobos
import path[1] = /usr/include/dmd/druntime/import
What is the process to follow here? Is this an permission issue ( since it says cannot be read ) or do I need to add any import statement for this to work?
PS: Not to get off-topic but is using WSL to learn DLang a bad idea to begin with? I am just getting used to WSL + VS Code and trying to stick to it when possible. cmd
& powershell
is just a headache for me to use.