c++ sqlite3 pthread error

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


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?



It's bee resolved by using -pthread instead of -lpthread.

Need Your Help

How can i hide the first item when click the second item in ListView using Expandanimation?

android listview animation

I Using to develop listview acts like the expandablelistview its works fine but one problem wil be there when i click second item first item does not close

Project idea using graph algorithms


I am a undergrad student looking for project ideas, well first my idea was to build a application to simulate graph algorithms but my lecturer told me that it would be better if i use graph algorit...