www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - combining libraries into 1 or 1 for each system?

reply Shadowblitz16 <DomainName Email.com> writes:
let's say I have a project the relies on multiple packages..
is it possible to combine these libraries into a single one (or 1 
per os) for final shipment of a program?
Sep 18 2019
parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 19 September 2019 at 03:44:28 UTC, Shadowblitz16 
wrote:
 let's say I have a project the relies on multiple packages..
 is it possible to combine these libraries into a single one (or 
 1 per os) for final shipment of a program?
I assume you're referring to dub packages, in which case any dependencies you have will usually be configured to compile as static libraries. That means they'll be compiled into the executable without any extra effort on your part. If they're configured as dynamic libraries, you'll need to ship the dynamic library with your executable or manually edit the configurations to compile as static libraries. If they're bindings to C libraries, you'll need to ship the C dynamic libraries unless you statically link them. If none of this answers your question, please clarify what you mean by "multiple packages".
Sep 18 2019
parent reply Shadowblitz16 <DomainName Email.com> writes:
On Thursday, 19 September 2019 at 05:16:33 UTC, Mike Parker wrote:
 On Thursday, 19 September 2019 at 03:44:28 UTC, Shadowblitz16 
 wrote:
 let's say I have a project the relies on multiple packages..
 is it possible to combine these libraries into a single one 
 (or 1 per os) for final shipment of a program?
I assume you're referring to dub packages, in which case any dependencies you have will usually be configured to compile as static libraries. That means they'll be compiled into the executable without any extra effort on your part. If they're configured as dynamic libraries, you'll need to ship the dynamic library with your executable or manually edit the configurations to compile as static libraries. If they're bindings to C libraries, you'll need to ship the C dynamic libraries unless you statically link them. If none of this answers your question, please clarify what you mean by "multiple packages".
I mean I don't want to have multiple dependency dll's but instead just my own dll with the dependencies packed inside. of course dll is only for windows so I would like this done for mac and linux too
Sep 19 2019
parent reply Mike Parker <aldacron gmail.com> writes:
On Thursday, 19 September 2019 at 18:28:25 UTC, Shadowblitz16 
wrote:

 I mean I don't want to have multiple dependency dll's but 
 instead just my own dll with the dependencies packed inside.

 of course dll is only for windows so I would like this done for 
 mac and linux too
Then statically link all your dependencies.
Sep 19 2019
parent Shadowblitz16 <DomainName Email.com> writes:
On Thursday, 19 September 2019 at 19:10:26 UTC, Mike Parker wrote:
 On Thursday, 19 September 2019 at 18:28:25 UTC, Shadowblitz16 
 wrote:

 I mean I don't want to have multiple dependency dll's but 
 instead just my own dll with the dependencies packed inside.

 of course dll is only for windows so I would like this done 
 for mac and linux too
Then statically link all your dependencies.
ok cool I will look into this.
Sep 19 2019