Compiling sqlite3.c in Ubuntu

Hi! I’m trying to compile the generated sqlite3.c file to include it in a project, but after successfully running these commands:

./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
make sqlite3.c

When I execute :

gcc -lpthreads -ldl sqlite3.c

I end up with lots of errors:

sqlite3.c:38208:42: error: ‘close’ undeclared here (not in a function); did you mean ‘clone’?
38208 |   { "close",        (sqlite3_syscall_ptr)close,      0  },
      |                                          ^~~~~
      |                                          clone
sqlite3.c:38211:42: error: ‘access’ undeclared here (not in a function)
38211 |   { "access",       (sqlite3_syscall_ptr)access,     0  },
      |                                          ^~~~~~
sqlite3.c:38214:42: error: ‘getcwd’ undeclared here (not in a function); did you mean ‘getcpu’?
38214 |   { "getcwd",       (sqlite3_syscall_ptr)getcwd,     0  },
      |                                          ^~~~~~
      |                                          getcpu
sqlite3.c:38234:42: error: ‘ftruncate’ undeclared here (not in a function); did you mean ‘strncat’?
38234 |   { "ftruncate",    (sqlite3_syscall_ptr)ftruncate,  0  },
      |                                          ^~~~~~~~~
      |                                          strncat
sqlite3.c:38240:42: error: ‘read’ undeclared here (not in a function); did you mean ‘fread’?
38240 |   { "read",         (sqlite3_syscall_ptr)read,       0  },
      |                                          ^~~~
      |                                          fread
sqlite3.c:38257:42: error: ‘write’ undeclared here (not in a function); did you mean ‘fwrite’?
38257 |   { "write",        (sqlite3_syscall_ptr)write,      0  },
      |                                          ^~~~~
      |                                          fwrite
sqlite3.c:38286:42: error: ‘unlink’ undeclared here (not in a function)
38286 |   { "unlink",       (sqlite3_syscall_ptr)unlink,           0 },
      |                                          ^~~~~~

Any tips to solve this issue?