Home > Uncategorised > And Another One!

And Another One!

November 26th, 2006 Leave a comment Go to comments

OK, this one only hit me today, but it bugged me, so I’ll blog it before I forget. Hopefully someone else will find it useful.

MinGW, or may be more specifically GDC, cannot find the standard include “object.d” if you are compiling files on a different drive in Windows.

To be more specific, my source code is stored in a directory on a network share mapped to a drive “P:”. If I try and compile the source code using GDC from the “P:” drive, it errors saying that it cannot find file “object.d”. However, if you change to the “C:” drive (or wherever MinGW is installed) and compile the file on the remote drive from there, it works.


p:\> gdc mytest.d
Cannot find file "object.d"
p:\> c:
c:\> gdc p:\mytest.d
<No Errors>

It seems to be, that the libraries are searched on the drive of the working directory, and not “always c:\”. I’m pretty sure that you can get around this with “-L” or “-I” directives to GDC, or setting some environment variable, but finding any reference to how to do this is like looking for rocking horse poo.

I can’t confirm whether this happens on other platforms yet or not, but I suspect it wouldn’t on systems with a Unified Directory Structure (such as Linux and MacOS X), as you are always on the same “drive”.

Categories: Uncategorised Tags:
  1. No comments yet.
  1. No trackbacks yet.