How to import modules from another folder ?

Vinod K Chandran kcvinu82 at gmail.com
Wed May 13 22:24:17 UTC 2020


On Wednesday, 13 May 2020 at 22:10:02 UTC, Vinod K Chandran wrote:
> Hi all,
> I am practicing some win32 api coding in D. So far so good. But 
> when i tried to import some d files from another folder, i 
> wonder how do this. This is my folder structure.
>
> --> Source Folder
> ----------> app.d  //This is my main file. I am importing 
> guiLib in this main file.
> ----------> guiLib.d // This file contains some public imports 
> like, Gui.d, Button.d etc
> ----------> LibFolder // this is a folder
> -----------------> Gui.d
> -----------------> Button.d
> -----------------> Label.d
>
> Do i need to pass the exact path ?

Hi all,
Sorry for bothering you. I think i found the answer myself.
If a d file which you want to import in your main file is in 
another directory, then just write this - "import 
YourDirectory.YourFile"


More information about the Digitalmars-d-learn mailing list