1

So I'm trying to compile some open source projects on Windows, and understand the various the linking scenarios available to me. The gist of the situation is that program A depends on library B and B depends on Boost. What I'm thinking I would like to do is to link library B statically to Boost so I don't have to mess with distributing Boosts DLLs, but then link A dynamically to B. Well I'm not really sure I care how A & B are linked, but for now it seems the project is typically distributed that way so I'm really trying to understand more of the linker process so I can make an informed choice and know what my options really are.

More concretely, I don't understand if there's a relationship between how a compiled library is linked to vs how the library linked to its dependencies. Ie do these scenarios work and make sense? Scenario A - B links to Boost statically, is compiled into a DLL which A links to dynamically Scenario B - B links to Boost statically, is compiled into a lib which A links to statically

David
  • 93
  • 4
  • 1
    Does this answer your question: https://stackoverflow.com/questions/1993390/static-linking-vs-dynamic-linking – Support Ukraine Jan 04 '21 at 06:02
  • 1
    Both your scenarios make sense to me. – john Jan 04 '21 at 07:09
  • Cool, had to sit on it a bit, get some sleep and run the builds for it to make sense to me but it's all working. I think the projects I'm working with just aren't built very often on Windows or with the linking scenarios I'm using so it took a bit of effort to get it all working as expected. – David Jan 05 '21 at 05:05

0 Answers0