title: Sqlite undefined reference to `sqlite3_open' error in Netbeans C++ on Ubuntu, Integrating SQLite into Netbeans C++ Ubuntu
body: <p>I am trying to use Sqlite in my Netbeans C++ and following the tutorial here
  <a href="http://www.dreamincode.net/forums/topic/122300-sqlite-in-c/" rel="nofollow noreferrer">http://www.dreamincode.net/forums/topic/122300-sqlite-in-c/</a></p>
  
  <p>When i build it,its giving me undefined  reference  to `sqlite3_open' and the other sqlite3 functions. I included the sqlite3.h too. What am i missing here?
  </p>
  
  <p>When i added the linker to static library libsqlite3.a in project properties, my undefined reference errors are gone but now its giving me </p>
  
  <p>/usr/lib/libsqlite3.a(sqlite3.o): In function <code>pthreadMutexTry':
  /usr/lib/libsqlite3.a(sqlite3.o): In function</code>pthreadMutexAlloc':
  /usr/lib/libsqlite3.a(sqlite3.o): In function <code>pthreadMutexAlloc':
  /usr/lib/libsqlite3.a(sqlite3.o): In function</code>pthreadMutexAlloc':
  /usr/lib/libsqlite3.a(sqlite3.o): In function <code>unixDlError':
  /usr/lib/libsqlite3.a(sqlite3.o): In function</code>findLockInfo':
  /usr/lib/libsqlite3.a(sqlite3.o): In function <code>findLockInfo':
  /usr/lib/libsqlite3.a(sqlite3.o): In function</code>unixDlSym':
  /usr/lib/libsqlite3.a(sqlite3.o): In function <code>unixDlClose':
  /usr/lib/libsqlite3.a(sqlite3.o): In function</code>unixDlOpen':
  collect2: ld returned 1 exit status
  make[2]: <strong>* [dist/Debug/GNU-Linux-x86/cddb] Error 1
  make[1]: *</strong> [.build-conf] Error 2
  make: *** [.build-impl] Error 2
  </p>
  
  <p>And if i include the sqlite3ext.h, I get
  
  main.cpp:20: error: ‘sqlite3_api’ was not declared in this scope
  </p>