Module import incompatibility
frame
frame86 at live.com
Tue Aug 31 12:57:33 UTC 2021
On Tuesday, 31 August 2021 at 12:37:51 UTC, bauss wrote:
> On Tuesday, 31 August 2021 at 12:26:28 UTC, frame wrote:
>> I'm sure it was asked before but can't find the thread:
>>
>> How to deal best with an older library that uses the same
>> class name as module name?
>> I get a lot of
>>
>> `Error: module ABC from file ...ABC.d must be imported with
>> 'import ABC'`
>>
>> Do I need to rename all modules?
>
> The problem is that the file doesn't have a module statement so
> the compiler tries to resolve the module name from the import
> but is unable to resolve that properly.
No, it has one, eg:
```d
module cairo.PdfSurface;
```
but the filename is PdfSurface.d and class name also :\
More information about the Digitalmars-d-learn
mailing list