How to build a static lib properly?
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Mon Mar 6 02:23:38 UTC 2023
On 06/03/2023 3:09 PM, ryuukk_ wrote:
> This is a bug in DCD in my book
This has nothing to do with DCD. This is on DUB, it was never designed
for anything related to distribution.
Nobody has attempted to change this. All the information is available
for it to do it.
Just a matter of adding another cli command that inherits from build.
> dub should build a static library for the project i build, that includes
> each library it uses that are referenced as "library" since the default
> is "staticLibrary" according to rikki
So the targetType library was meant to devolve into either staticLibrary
or dynamicLibrary as determined at a later point in time circa 2012.
Problem is it will never be able to devolve into a shared library. That
requires code to be modified to work with it.
Right now targetType library is the default, but should really be
removed at some point in the future.
Its good to remember that shared library support has only really gotten
to the point in ldc where we can start to see a glimmer of hope in the
last 2-3 years. Back in 2012 it was practically something very few
people could even hope to use.
dmd is still a complete write off, but work is being done to now resolve
that and I'm on the solving the language level issues with a DIP :)
More information about the Digitalmars-d-learn
mailing list