On 2011-06-13 23:51, Jonathan M Davis wrote:
On 2011-06-13 14:44, Loopback wrote:
Thanks for your answer!

Seems like supplying with the file location solved the problem, though I
still wonder about one thing. The imported module is located in
"c:/d/dmd2/import/win32/windef.d" and I have used this command line to
the DMD compiler: -I"c:/d/dmd2/import/". Shouldn't the linker/compiler
be able to solve this on its own then?

-I just tells it where to look for imports, not what to link. The linker never
links in anything unless you explicitly tell it to - either by having it
directly on the command line or in DFLAGS (usually set by dmd.conf on Linux
and sc.ini or Windows). Phobos is listed in dmd.conf/sc.ini, which is why it
gets linked in. If it wasn't there, you'd have to list it explicitly too.

- Jonathan M Davis
Can you modify the sc.ini so the linker automatically checks a specific
directory for imports? Let's say for example this I have my imports in
c:/d/dmd2/import/, can I implement this in sc.ini so I don't have to
worry about these specific linker errors again?

I tried adding "-I%@P%\..\..\import" (custom import directory) in sc.ini
without success.

Another question I'm wondering is; if I include a module and tell its
location explicitly to the linker, do I then also have to tell the
linker the location of all local imports this file have as well?

Reply via email to