static library implementation vs including source code implementation

As an already compiled executable file, basically there is no difference between them. I think the point is your purpose of software engineering.

If you are a component developer, static link libraries can keep your valuable source code secret. If you are making source code as business, it is probably very important.

Meanwhile, if you want people use your source code on any platform, you may want to release your modules as source code, as open source developers are doing.


I'd advocate inclusion of source code because:

  1. Static library is more architecture depending than source code. You will need to compile it again and again.
  2. Optionally, source code allows more optimization than linking with a pre-compiled library.
  3. When examining the program it is always better to have the possibility to see the source code than just a prototype.