dmd error in wsl2
bharathyes
bharathyes.in at gmail.com
Tue May 25 15:54:31 UTC 2021
I am facing an issue compiling an hello world program using dmd
v2.096.1 running on WSL2 debian.
I wrote the basic code:
```d
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.
More information about the Digitalmars-d-learn
mailing list