On Saturday, 13 October 2012 at 11:07:36 UTC, Jacob Carlborg wrote:
If you specify the path where the compiler should find import files in a source file, how should the compiler handle that?

Source code does not depend on an import path, that is an environment issue. Thus you would not specify import paths in source files.

I've
realized that the dependency on a library only makes sense for header files, and header files only make sense when interfacing with C. Dependency on D code and libraries all come stated from the 'import'
statement.

Ok, I really don't understand this last section.

    module bob;
    extern(C) void fishingBob();

This function has no definition, code importing bob is not getting fishingBob.

    module joe;
    void runningJoe() { ... }

The code importing joe does get runningJoe. So while I think this change makes sense:

    module bob;
    pragma(lib, "bob.lib");
    extern(C) void fishingBob();

This one does not:

    module joe;
    pragma(lib, "joe.lib");
    void runningJoe() { ... }

Or

    import tango.Text;
    pragma(lib, "tango.lib"); ...

Reply via email to