digitalmars.D.learn - Modules/packages and cryptic errors
- al (8/8) Oct 31 2009 I have main.d with:
- Frank Benoit (3/4) Oct 31 2009 This often indicates a modules file name and the identifier in the
- al (5/10) Oct 31 2009 I have all files and imports lowercase. I have class names following fil...
- Frank Benoit (4/21) Oct 31 2009 if 'foo' shall be package, in bar.d there should be "module foo.bar;".
I have main.d with: import foo.bar and when I run: dmd foo/*.d main.d I get: module bar is in multiple defined This is pretty strange. The only way I can silence this error is to add "module dirname.filename" to *every* file. Surely there must be less annoying method?
Oct 31 2009
al schrieb:module bar is in multiple definedThis often indicates a modules file name and the identifier in the "module" statement are unequal (case sensitivity)
Oct 31 2009
Frank Benoit Wrote:al schrieb:I have all files and imports lowercase. I have class names following filenames capitalized, but that shouldn't matter, should it? When I run: dmd foo/bar.d is that assuming module foo.bar or bar? If that's the latter, it might explain why I'm getting an error (import finds this file under foo.bar), but how should I compile files then?module bar is in multiple definedThis often indicates a modules file name and the identifier in the "module" statement are unequal (case sensitivity)
Oct 31 2009
al schrieb:Frank Benoit Wrote:if 'foo' shall be package, in bar.d there should be "module foo.bar;". If imported from somewhere else, it should be "import foo.bar;". Class/Type names should not matter.al schrieb:I have all files and imports lowercase. I have class names following filenames capitalized, but that shouldn't matter, should it? When I run: dmd foo/bar.d is that assuming module foo.bar or bar? If that's the latter, it might explain why I'm getting an error (import finds this file under foo.bar), but how should I compile files then?module bar is in multiple definedThis often indicates a modules file name and the identifier in the "module" statement are unequal (case sensitivity)
Oct 31 2009