Should I link sqlite3 as simple object code or static library in a C ++ application?
I am creating a C ++ application that uses sqlite3 as an embedded database. The source for sqlite3 is distributed as a combined source file sqlite3.c
and two header files.
What are the relative advantages or disadvantages of linking sqlite3 code directly in my program binary, or compiling sqlite3 as a static library and linking it that way?
I've already decided not to reference the sqlite3 code as a dynamic library.
source to share
The static library will compile into your program. The code link is directly compiled into your program. So it looks like it's actually the same :) It might be easier to manage the project if you linked it as a static library, since you will have fewer source files. On the other hand, if you need to make quick changes to the original library files, this does not require restoring the static library. Ultimately it depends on you.
source to share