static library implementation vs including source code implementation
c, compilation, static-libraries
Solution
I'd advocate inclusion of source code because:
- Static library is more architecture depending than source code. You will need to compile it again and again.
- Optionally, source code allows more optimization than linking with a pre-compiled library.
- When examining the program it is always better to have the possibility to see the source code than just a prototype.
Problem
What are the general differences between compiling a program as a static library vs. including the source code into the program? i.e. A program with functions that is compiled as a static library (.lib) and linked into the program vs A program with functions that is included as a source file in the main program. Static libraries more suitable for release when releasing closed source programs? Faster compilation? etc..