How to include my own library in my d program with dub ?

Vinod K Chandran kcvinu82 at gmail.com
Fri May 15 14:05:14 UTC 2020


On Thursday, 14 May 2020 at 12:57:19 UTC, JN wrote:
> On Thursday, 14 May 2020 at 12:53:43 UTC, Vinod K Chandran 
> wrote:
>> Hi all,
>> I just build a skeleton of a Gui library(win32 based) for my 
>> own purpose. How do i use this in my d programs with dub ? 
>> Now, all files are located in a folder called "GuiLib".
>> Side note : Why i started making a gui library instead of 
>> learning language ?
>> Answer : By this way, i can learn the language and i will have 
>> my own gui library. Otherwise, i would have struggle with 
>> learning a third party library.
>
> I don't know if it's up-to-date, but this should work:
>
> https://github.com/dlang/dub/wiki/Cookbook#working-with-submodules-or-packages-that-are-not-in-the-registry
>
> I am assuming your GUI library uses dub already for building?

Thanks for the reply. Sadly, dub is not working for this project. 
My gui library is currently in developing stage. I wrote 4 
classes and pack them inside a package. All i can do is running 
the main file with "dmd -i". This is working. But when i try with 
dub, it says it can't resolve functions like LoadIconW. Do you 
know how to add the code to run my program in dmd compiler 
options. Currently it can build my program and for running, i 
need to manually run it.


More information about the Digitalmars-d-learn mailing list