Re: Weird RDMD error when trying to import source file from subfolder.

2023-11-01 Thread Julian Fondren via Digitalmars-d-learn

On Wednesday, 1 November 2023 at 16:24:04 UTC, BoQsc wrote:

**Error:**

```
rdmd testimport.d
testimport.d(2): Error: module `next` from file waffle\next.d 
must be imported with 'import next;'

```


You import 'waffle.next', but the module is inferred to be 
'next'. If put `module waffle.next;` at the top of next.d, this 
works.


Weird RDMD error when trying to import source file from subfolder.

2023-11-01 Thread BoQsc via Digitalmars-d-learn

I'm unable to import a `.d` source file from a subfolder.

Now this happens only with `rdmd`.
The `dmd -i -run` works perfectly.

I'm currently on Windows 10 operating system.




**./testimport.d**:

```
import std;
import waffle.next;
void main(){
writeln("test", testing);
}
```

**./waffle/next.d**:

```
int testing = 5;
```

**Error:**

```
rdmd testimport.d
testimport.d(2): Error: module `next` from file waffle\next.d 
must be imported with 'import next;'

```