Understanding how dub works

datboi datboii at o2.pl
Wed Dec 13 20:43:43 UTC 2017


On Wednesday, 13 December 2017 at 00:43:31 UTC, rikki cattermole 
wrote:
> 
>> 1. Does dub compile dependencies as separate binaries? And if 
>> yes how to specify where should be they placed?
>
> Object/static files, but yes.
>
> Where they go:
>
> Windows: %APPDATA%/roaming/dub
> Posix: ~/.dub
>
> You don't need to change this and if you think you do, you're 
> wrong :)
>
>> 2. It is possible to compile subpackage as a dynamic or static 
>> library and link it to main binary file? Or just better create 
>> separate dub package and use it as dependency?
>
> Static yes, dynamic it won't link against (some bug last I 
> heard).
> Have to do that manually.
>
> "dependencies": { "mypackage:subpackage": "*" }
>
> Change as required for SDL.

At first thanks for answers.
So going back to my first question. Code from dependencies is 
compiled with mine project to one single executable?



More information about the Digitalmars-d-learn mailing list