Thread overview | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 02, 2006 why | ||||
---|---|---|---|---|
| ||||
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 ? |
July 02, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to freud | On Sun, 02 Jul 2006 17:35:24 +1000, freud <freud_member@pathlink.com> 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 ? > > I can't reproduce this effect. Can you show us the source code of xx.d, the command line you use to compile it, and the contents of dmd\bin\sc.ini file? -- Derek Parnell Melbourne, Australia |
July 02, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to freud | freud schrieb:
> 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 ?
>
>
The module statement and the actual location and name of your source file do not match.
in Folder 'a', file 'b.d':
module a.b;
|
July 02, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | On Sun, 02 Jul 2006 21:01:18 +1000, Frank Benoit <keinfarbton@nospam.xyz> wrote: > freud schrieb: >> 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 ? >> >> > > The module statement and the actual location and name of your source > file do not match. > > in Folder 'a', file 'b.d': > module a.b; Frank, can you show me some source code that will give this message? Note that the file name in the message is the same in all three places... XX.d(1):module XX cannot read file XX.d I can get the message in the form FILEONE.d(1):module FILETWO cannot read file FILETWO.d but not in the form reported. -- Derek Parnell Melbourne, Australia |
July 02, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to freud | 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.
|
July 02, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hasan Aljudy | On Mon, 03 Jul 2006 03:30:06 +1000, Hasan Aljudy <hasan.aljudy@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 |
July 02, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Derek Parnell wrote:
> On Mon, 03 Jul 2006 03:30:06 +1000, Hasan Aljudy <hasan.aljudy@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.
-JJR
|
July 03, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | 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@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. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocrity!" 3/07/2006 10:16:49 AM |
July 03, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | 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@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
|
July 03, 2006 Re: why | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Reimer | On Sun, 02 Jul 2006 18:34:03 -0700, John Reimer wrote: > 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@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 This is a quote from the D documentation on modules ... "By convention, package and module names are all lower case. This is because those names have a one-to-one correspondence with the operating system's directory and file names, and many file systems are not case sensitive. All lower case package and module names will minimize problems moving projects between dissimilar file systems." Good advice to heed. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Down with mediocrity!" 3/07/2006 11:39:10 AM |
Copyright © 1999-2021 by the D Language Foundation