I'm trying to build sqlite3 on my linux and use it in my c++ code. However, after compiling sqlite3 and including #include <sqlite3.h> I get the following error:
.../main.cpp|52|undefined reference to `sqlite3_open'|
and after adding sqlite3.c and sqlite3.h to my project I get the following error:
.../sqlite3.c|20803|undefined reference to `pthread_mutexattr_init'|
I tried sqlite3 with both following settings:
gcc shell.c sqlite3.c -lpthread -ldl
and
gcc -DSQLITE_THREADSAFE=0 shell.c sqlite3.c -ldl
Do you have any idea where the problem might be or do you know any SQLite3 CPP wrapper?
Thanks,
Aucun commentaire:
Enregistrer un commentaire