I have a library that has many folders and D files in them. I do not want to list name of all module files one by one while compiling projects. So, I thought I could use "-I" flag while compiling. It says:

-Ipath
    where to look for imports

So, I made a test as follows:


./test.d
==================================
import inc.blah;

void main(){
        inc.blah.a = 5;
}


./inc/blah.d
==================================
module inc.blah;

public int a;


./makefile
==================================
all:
        dmd -I"./inc/" test.d


When I do "make", result is as follows:

dmd -I"./inc/" test.d
test.o: In function `_Dmain':
test.d:(.text._Dmain+0x10): undefined reference to `_D3inc4blah1ai'


Do I understand wrong how that "-I" flag works?

Reply via email to