title: How to compile sqlite3.c in Fedora?
body: <p>I'm having trouble building the sqlite3 amalgamation the same way I used to do it in windows, by compiling the source right into my program, here is my current makefile</p>
  
  <pre><code>all:
      gcc -g -c sqlite3.c -o sqlite3.o
      g++ -g -c main.cpp -o main.o
      g++ -o test sqlite3.o main.o
  </code></pre>
  
  <p>my main.cpp file:</p>
  
  <pre><code>#include "sqlite3.h"
  
  int main(){
    //nothing
   return 0;
  }
  </code></pre>
  
  <p>and here are the errors i receive when compiling:</p>
  
  <pre><code>sqlite.o: In function `pthreadMutexAlloc':
  /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:17910: undefined reference to
  `pthread_mutexattr_init'
  /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:17911: undefined reference to
  `pthread_mutexattr_settype'
  /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:17913: undefined reference to`pthread_mutexattr_destroy'
  sqlite.o: In function    
  `pthreadMutexTry':
  /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:18042: undefined reference to `pthread_mutex_trylock'
  sqlite.o: In function `unixDlOpen': /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:28164: undefined reference to `dlopen' 
  sqlite.o: In function `unixDlError':
  /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:28178: undefined reference to `dlerror'
  sqlite.o: In function `unixDlSym':
  /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:28204: undefined reference to `dlsym'
  sqlite.o: In function `unixDlClose':
  /home/kendal/c++/sqlite3/test/../lib/sqlite3.c:28209: undefined reference to `dlclose'
  </code></pre>