When to use dynamic vs. static libraries
问题 When creating a class library in C++, you can choose between dynamic ( .dll , .so ) and static ( .lib , .a ) libraries. What is the difference between them and when is it appropriate to use which? 回答1: Static libraries increase the size of the code in your binary. They're always loaded and whatever version of the code you compiled with is the version of the code that will run. Dynamic libraries are stored and versioned separately. It's possible for a version of the dynamic library to be