How to use the -I command line switch?
Ali Çehreli
acehreli at yahoo.com
Wed Jan 3 21:55:14 UTC 2018
On 01/03/2018 01:42 PM, Tony wrote:
> On Wednesday, 3 January 2018 at 18:35:21 UTC, Ali Çehreli wrote:
>> Working as expected... :)
>>
> What about the error message? If -I is only for DMD finding "import ..."
> files, and not files on the command line, why does DMD list what was in
> the -I "where to look for import directives" when saying that it can't
> find a command-line file? It says that it can't locate my_module.d and
> then lists the directory that my_module.d is in.
Yeah, there's definitely a problem there.
It's possible that the compiler is acting like this: Because there is
already my_module.d on the command line, it assumes that main's 'import
my_module' must mean that file. Because there is no such file in the
local directory, it errors out by using a generic error message
function, which does not explain the situation well.
I made that all up but I bet it's something like that. :)
Ali
More information about the Digitalmars-d-learn
mailing list