On 2012-10-13 23:11, Jesse Phillips wrote:
Source code does not depend on an import path, that is an environment
issue. Thus you would not specify import paths in source files.
You need to specify it somewhere. Why would I want half of the compiler
flags in one place and the other half in another place? And why should I
need to specify it in the first place, when the built tool can do that
with the help of the package manager.
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"); ...
Sure that's not point if you building from source. But if you
pre-compile a library and have import files (.di) then pragma(lib) would
make sense, but it doesn't currently work with import files anyway.
--
/Jacob Carlborg