On 12/28/2014 3:01 AM, Derix wrote:
But of course ! I should have thought of this myself.
Subsequent question though : what is the -I option for ? The dmd
embedded help states

-Ipath         where to look for imports

so I'd naively think it would work too, but it yields the same
error as above.

-I is for compile time, not link time. When the compiler is compling a module, the compiler searches the import path for all the imported modules, loads the files and parses them. This is how it knows which symbols are available in the module it is currently compiling.

The compiler does not automatically compile imported modules, so the -I switch has no impact on the linker. Any modules you actually import and use still need to be passed for linking in some manner, either by compiling all the modules at the same time, compiling each individually with -c, linking with a library, or linking with individual object files.

Reply via email to