June 24, 2010
Hi,

D newbie here with a few import/module related questions.

I have a test project with the following dir/file layout:

c:\test.d
c:\testmod\c.d

The modules reference each other via imports (nice!) and it all compiles fine as long as I specify both modules on the dmd command line, eg:

dmd test.d testmod\c.d

But I can't get '-I' to do this for me, eg:

dmd -IC:\ test.d

doesn't work - can't find the second module.

What am I doing wrong? Or is this the way it works - if so, what does -I actually do?

I also notice that you seem to be able to call packages/modules anything you want!

The docs state that package names=dirs and module names=files, but you can apparently use anything you want for either, as long as the module decl matches the import.

Bye!
Mark

PS: the samples in the windows release don't work - they're looking for a dmd/bin dir, but there's only dmd/windows. Tried copying bin/lib dirs in windows up a level but still doesn't work.
September 04, 2010
Good question. I would also like to find a good explanation to the compilation and how does file/package/module resolution works. I have issues making dsss work and I think the issue is also related to the fact that the package/module resolution is not doing what I would like it to do.