Sqlite3 动态编译可以,静态编译出错
/home/farsight/sqlitelib/lib/libsqlite3.a(mutex_unix.o): In function `sqlite3_mutex_alloc':
/home/farsight/sqlitelib/./src/mutex_unix.c:117: undefined reference to `pthread_mutex_init'
/home/farsight/sqlitelib/./src/mutex_unix.c:104: undefined reference to `pthread_mutexattr_init'
/home/farsight/sqlitelib/./src/mutex_unix.c:105: undefined reference to `pthread_mutexattr_settype'
/home/farsight/sqlitelib/./src/mutex_unix.c:106: undefined reference to `pthread_mutex_init'
/home/farsight/sqlitelib/./src/mutex_unix.c:107: undefined reference to `pthread_mutexattr_destroy'
/home/farsight/sqlitelib/lib/libsqlite3.a(mutex_unix.o): In function `sqlite3_mutex_free':
/home/farsight/sqlitelib/./src/mutex_unix.c:142: undefined reference to `pthread_mutex_destroy'
/home/farsight/sqlitelib/lib/libsqlite3.a(mutex_unix.o): In function `sqlite3_mutex_enter':
/home/farsight/sqlitelib/./src/mutex_unix.c:187: undefined reference to `pthread_self'
/home/farsight/sqlitelib/lib/libsqlite3.a(mutex_unix.o): In function `sqlite3_mutex_try':
/home/farsight/sqlitelib/./src/mutex_unix.c:231: undefined reference to `pthread_self'
/home/farsight/sqlitelib/lib/libsqlite3.a(os_unix.o): In function `findLockInfo':
/home/farsight/sqlitelib/./src/os_unix.c:643: undefined reference to `pthread_self'
/home/farsight/sqlitelib/lib/libsqlite3.a(os_unix.o): In function `testThreadLockingBehavior':
/home/farsight/sqlitelib/./src/os_unix.c:506: undefined reference to `pthread_join'
/home/farsight/sqlitelib/./src/os_unix.c:507: undefined reference to `pthread_join'
/home/farsight/sqlitelib/lib/libsqlite3.a(os_unix.o): In function `fillInUnixFile':
/home/farsight/sqlitelib/./src/os_unix.c:2280: undefined reference to `pthread_self'
/home/farsight/sqlitelib/lib/libsqlite3.a(os_unix.o): In function `unixUnlock':
/home/farsight/sqlitelib/./src/os_unix.c:1338: undefined reference to `pthread_self'
/home/farsight/sqlitelib/lib/libsqlite3.a(os_unix.o): In function `transferOwnership':
/home/farsight/sqlitelib/./src/os_unix.c:743: undefined reference to `pthread_self'
collect2: ld returned 1 exit status
make: *** [all] 错误 1