Thread overview | |||||
---|---|---|---|---|---|
|
July 24, 2005 Module name clashes | ||||
---|---|---|---|---|
| ||||
Given File math.d: # import std.math; # // etc File main.d: # import math; # void main() {} >dmd main math {...}\src\phobos\std\math.d(12): module math is in multiple defined Is there a way to resolve this? If module names have to be globally unique within a program, what's the point of package qualifiers? cheers Mike |
July 26, 2005 Re: Module name clashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Capp | Mike Capp wrote:
> Given
>
> File math.d:
>
> # import std.math;
> # // etc
>
> File main.d:
>
> # import math;
> # void main() {}
>
>
>>dmd main math
>
> {...}\src\phobos\std\math.d(12): module math is in multiple defined
>
> Is there a way to resolve this? If module names have to be globally unique
> within a program, what's the point of package qualifiers?
>
> cheers
> Mike
>
>
Are you using a module statement at the top of your module?
|
August 02, 2005 Re: Module name clashes | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | In article <dc40mj$2nka$1@digitaldaemon.com>, Mike Parker says... > >Mike Capp wrote: >> Given >> >> File math.d: >> >> # import std.math; >> # // etc >> >> File main.d: >> >> # import math; >> # void main() {} >> >> >>>dmd main math >> >> {...}\src\phobos\std\math.d(12): module math is in multiple defined >> >> Is there a way to resolve this? If module names have to be globally unique within a program, what's the point of package qualifiers? >Are you using a module statement at the top of your module? No, I wasn't, and yes, the problem goes away if I add a module statement with an explicit package qualifier. Thanks for that. I'm still puzzled as to what's going on, though. If the package is part of the module identifier then there shouldn't have been a clash in the first place, and if it isn't then the module statement shouldn't have made any difference. Is this a (known) bug in D? cheers Mike |
Copyright © 1999-2021 by the D Language Foundation