Import module in D from a sister folder? -
suppose have following directory structure project:
myproj/dir1/file1.d myproj/dir2/file2.d myproj/main.d
how can import main
, file2
modules within source file file1.d
?
file1.d have module dir1.file1;
line , file2.d have module dir2.file2;
line , main.d start module main;
.
module declarations above tell d when encounters line like: import main, dir2.file2;
;
as suggested @sigod , read http://dlang.org/module.html more information.
Comments
Post a Comment