4 Things You Need to do to use a library function in C

 
Written By Sanjir Habib On Dec-26th, 2017

Step 1

Include the header in *.c file

include <sqlite3.h>

Step 2

Add the path of the header as C compiler argument -I

gcc -I/usr/local/include/sqlite3/ ...

Step 3

Add the path of the library file as compiler argument -L

gcc -L/usr/local/lib/sqlite3/ ...

Step 4

Add the library file as linker argument -l

gcc -lsqlite3 ...

It should now compile and work.