www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to include my own library in my d program with dub ?

reply Vinod K Chandran <kcvinu82 gmail.com> writes:
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.
May 14 2020
parent reply JN <666total wp.pl> writes:
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?
May 14 2020
parent Vinod K Chandran <kcvinu82 gmail.com> writes:
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.
May 15 2020