digitalmars.D.learn - module renaming by declaration
- Christof Schardt (16/16) Mar 19 2016 The module declaration allows to define a module name different from the...
- Adam D. Ruppe (8/9) Mar 19 2016 Using rdmd. It assumes the filename will match the module name to
The module declaration allows to define a module name different from the filename. (TDPL sec. 11.1.8) I tried a simple example: File test.d: --------- import bbb; --------- File aaa.d (same directory): --------- module bbb; --------- Running rdmd test.d does give an error: "module bbb is in file bbb.d which cannot be read" What am I doing wrong?
Mar 19 2016
On Saturday, 19 March 2016 at 16:02:33 UTC, Christof Schardt wrote:What am I doing wrong?Using rdmd. It assumes the filename will match the module name to locate the file, though the language itself doesn't require this. What you want to do to make this work is use ordinary dmd and pass both files to it at the same time: dmd aaa.d test.d and it will work then.
Mar 19 2016