What is the difference between static and dynamic (shared) libraries in C++?
Hello everyone! I recently started learning C++ and am trying to understand libraries. I look at projects on GitHub and see that some link .lib files, others .dll (or .so on Linux). As far as I understand, there are two types of libraries: static and dynamic (shared). Can someone explain in simple terms what the difference is?
I have a small project: I wrote a class for working with matrices (multiplication, transposition, etc.). Now I want to make it into a library to use in different programs. But I don't understand which type to choose. What happens if I use a static library? And if I use a dynamic one? How will this affect the executable file size, performance, and ease of updating?
Here is an example of the code I want to turn into a library:
```cpp
// matrix.h
#pragma onc
```