How to use an existing D package in Visual D?

Mike Parker aldacron at gmail.com
Tue Apr 5 09:57:29 UTC 2022


On Tuesday, 5 April 2022 at 09:26:54 UTC, realhet wrote:
> Hello,
>
> I have all my D packages in the c:\D\libs\ directory.
> I added this path to the PropertyPages/Compiler/Additional 
> Import Paths field.
>
> In the project source file I imported a module from my package 
> using "import het.utils;"
> Also used a function from it.
>
> The syntax highlighter worked good, and the compiler was able 
> to build main.obj file.
>
> But I can't find the het.utils.obj file nowhere. Also the 
> linker is unable to link the things in it.
>
> My question is that how can I add an external package the right 
> way to my project in Visual D?
>
> I'm planning to use that package from other projects too, so I 
> want to keep it in one place on my HDD.
>
> Thank You in advance!

Importing modules is only for showing the compiler which symbols 
are available for you to use. By default, it does not cause them 
to be compiled or linked. You should compile the existing package 
as a library, then add the library file to the linker settings in 
VisualD.


More information about the Digitalmars-d-learn mailing list