rdmd bug?
Nick Voronin
elfy.nv at gmail.com
Sun Dec 19 17:27:33 PST 2010
On Mon, 20 Dec 2010 01:24:02 +0100
CrypticMetaphor <CrypticMetaphor88 at gmail.com> wrote:
> Anyway, the problem is, if I call rdmd from outside the folder in which
> the main source resides in, and main includes another file in that
> folder, I get an error.
> // If I'm in a shell, and I do this, I get an error:
> ...\projectfolder>rdmd src\main.d
> src\main.d(2): Error: module test is in file 'test.d' which cannot be read
> import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
> import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
> Anyway, I want to be able to compile with rdmd from a different folder,
> is this a bug? or should I use a different tool? :-S
> *aahhh*
Add -Ifullpath_to_projectfolder\src. It's the way it works IMHO, if you import something it must be relative to search path or to current dir. There may be a better way (replace current dir with the dir where source is, but it will take away control), but this works.
There is a bug though, I can't make it work with -Irelative_path_to_src. Looks like .deps contain paths relative to where rdmd was ran, while dmd interprets them as paths relative to where .deps file is.
--
Nick Voronin <elfy.nv at gmail.com>
More information about the Digitalmars-d-learn
mailing list