why

John Reimer terminal.node at gmail.com
Sun Jul 2 18:34:03 PDT 2006


Derek Parnell wrote:
> On Sun, 02 Jul 2006 16:12:53 -0700, John Reimer wrote:
> 
>> Derek Parnell wrote:
>>> On Mon, 03 Jul 2006 03:30:06 +1000, Hasan Aljudy 
>>> <hasan.aljudy at gmail.com> wrote:
>>>
>>>> freud wrote:
>>>>> why do i always get a "xx.d:module xx cannot read file xx.d" when i 
>>>>> compile
>>>>> xx.d?  i'm just beginning to learn the d language, anyone can help me ?
>>>>>
>>>> Could be anything, but ..
>>>> When it happens to me, it's because I'm using `build` and the module 
>>>> name doesn't match the file name.
>>> Well, I still can cause it to happen no matter method I choose. For 
>>> example ...
>>>
>>> ---- main.d ----
>>> module xyzzy;
>>> void main(){}
>>> ------------------
>>>
>>> build main.d is successful.
>>> dmd main.d is successful.
>>>
>>> --Derek Parnell
>>> Melbourne, Australia
>> The error was showing up when I mistakenly tried to import a module like so:
>>
>> --------------
>>
>> module amod;
>>
>> struct foo {}
>>
>> --------------
>>
>> module bmod;
>>
>> private import Amod;
>>
>> void main() {}
>>
>> ---------------------
>>
>> but this doesn't seem to produce the problem. It happened when I 
>> imported a library module with the first letter capitalized, though the 
>> actual module name was all lower case.
>>
>> I'm not sure which platform I was struggling with, but I think it was 
>> windows.  I finally figured out that build was choking on the 
>> recognition of the capital letter.
> 
> I believe that D is case-sensitive when it comes to module names. I know
> that these translate into case-insensitive file names in Windows but
> there's not much I can do about that, I guess.
> 


No, that's true. No problem.  Just was useful for me to figure out the 
problem was.  Now that I know, I'm careful. :)

-JJR



More information about the Digitalmars-d mailing list