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

3
  • 1
    Does this answer your question: stackoverflow.com/questions/1993390/… Commented Jan 4, 2021 at 6:02
  • 1
    Both your scenarios make sense to me. Commented Jan 4, 2021 at 7: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. Commented Jan 5, 2021 at 5:05

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.