September 11, 2005 Re: library header | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath Attachments: | I still can't cope with importing :( With the included little import testing layout I get: "c:\D\MyD\Other\ImportTest\Main\all.d(4): module test1 is in multiple packages te st1" Where am I wrong? ElfQT |
September 11, 2005 Re: library header | ||||
---|---|---|---|---|
| ||||
Posted in reply to ElfQT | On Sun, 11 Sep 2005 22:55:55 +0200, ElfQT wrote: > I still can't cope with importing :( > With the included little import testing layout I get: > "c:\D\MyD\Other\ImportTest\Main\all.d(4): module test1 is in multiple > packages te > st1" > Where am I wrong? > ElfQT You have got an incorrect 'module' statement. That is, you have an import statement that references a file whose module statement is either missing or not qualified enough, or just plain wrong. eg. import util.myfile; but the file "util/myfile" does NOT have the module statement ... module util.myfile; In other words, your import statements must match the imported files' module statement (explicit or implied). -- Derek Parnell Melbourne, Australia 12/09/2005 6:59:18 AM |
September 12, 2005 Re: library header | ||||
---|---|---|---|---|
| ||||
Posted in reply to Derek Parnell | Oh my, you know what was the root of the problem? (Besides of me being silly ;)) Character case. I typed "RenderTarget" as module name, and imported "rendertarget". Also, this isn't always causes error - with another mis-cased module name it simply compiled. (?) Well then, there's still a bug in D with importing - it gives a wrong (and misleading) error. I wonder if it is known? Thanks Derek. ElfQT "Derek Parnell" <derek@psych.ward> wrote in message news:5k6qm7ztks4e$.bk5tgngz7xai.dlg@40tude.net... > On Sun, 11 Sep 2005 22:55:55 +0200, ElfQT wrote: > >> I still can't cope with importing :( >> With the included little import testing layout I get: >> "c:\D\MyD\Other\ImportTest\Main\all.d(4): module test1 is in multiple >> packages te >> st1" >> Where am I wrong? >> ElfQT > > You have got an incorrect 'module' statement. That is, you have an import statement that references a file whose module statement is either missing or not qualified enough, or just plain wrong. > > eg. > import util.myfile; > > but the file "util/myfile" does NOT have the module statement ... > > module util.myfile; > > In other words, your import statements must match the imported files' module statement (explicit or implied). > > -- > Derek Parnell > Melbourne, Australia > 12/09/2005 6:59:18 AM |
Copyright © 1999-2021 by the D Language Foundation