Compiling to shared library with static dependencies

Relja Ljubobratovic via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 14 14:35:27 PST 2016


On Wednesday, 14 December 2016 at 22:17:25 UTC, Tanel L wrote:
> First of all thanks Johan for urging me to compile it with only 
> with that flag. It worked! Previously I tried to compile it 
> with only BUILD_SHARED or both - and that failed. But I got it 
> working. Thanks! More details below.
>
Awesome!

> Thanks, I will use this as a template in the future.

Please don't :) - consider other options (D is full of them, I'm 
sure you'll find much more elegant solution), I pulled this just 
as a quick test!

> Thanks, I don't need ffmpeg and I will surely use your advice. 
> I am not worried about the size much. Is there any way to 
> include many/most of them into the binary? Or should I just 
> ship the deps alongside the shared lib?

You could build ffmpeg for static linking, but I'm not sure about 
ggplotd's deps - I suppose there's a way I just haven't done it 
before.

> Success!
> Thank you both so much. With this I can successfully move 
> forward with using D in our company :)

Congrats! - if it's possible keep us posted of your endeavors for 
which you're using Mir and DCV! And of course, feel free to make 
a question, bug report, feature request etc at our repositories:
https://github.com/libmir/mir
https://github.com/libmir/dcv

All of the best,
Relja



More information about the Digitalmars-d mailing list