sqlite|sqlite 及其编译问题
ubuntu@sky:~/sqlite$ gcc sql_get_table.c
/tmp/cc6DoZtO.o: In function `main':
sql_get_table.c:(.text+0x73): undefined reference to `sqlite3_open'
sql_get_table.c:(.text+0x8a): undefined reference to `sqlite3_errmsg'
sql_get_table.c:(.text+0x165): undefined reference to `sqlite3_get_table'
sql_get_table.c:(.text+0x203): undefined reference to `sqlite3_free_table'
sql_get_table.c:(.text+0x215): undefined reference to `sqlite3_close'
collect2: ld returned 1 exit status
ubuntu@sky:~/sqlite$
ubuntu@sky:~/sqlite$ gcc -o sqlexe -L /usr/local/lib -I /usr/local/include/ -static sqlexe.c -lsqlite3
【sqlite|sqlite 及其编译问题】/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `pthreadMutexTry':
(.text+0x10b6d): undefined reference to `pthread_mutex_trylock'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `pthreadMutexFree':
(.text+0x10b9e): undefined reference to `pthread_mutex_destroy'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `pthreadMutexAlloc':
(.text+0x10bdf): undefined reference to `pthread_mutex_init'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `pthreadMutexAlloc':
(.text+0x10c13): undefined reference to `pthread_mutexattr_init'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `pthreadMutexAlloc':
(.text+0x10c23): undefined reference to `pthread_mutexattr_settype'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `pthreadMutexAlloc':
(.text+0x10c2f): undefined reference to `pthread_mutex_init'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `pthreadMutexAlloc':
(.text+0x10c37): undefined reference to `pthread_mutexattr_destroy'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `unixDlError':
(.text+0x1c1e8): undefined reference to `dlerror'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libsqlite3.a(sqlite3.o): In function `unixDlSym':
(.text+0x2334): undefined reference to `dlsym'
ubuntu@sky:~/sqlite$ gcc -o sqlexe -L /usr/local/lib -I /usr/local/include/ -static-libgfortran sqlexe.c -lsqlite3
ubuntu@sky:~/sqlite$ ls
libsqlite3-0_3.7.2-1ubuntu0.1_i386.debsqlexesql_get_tablesqlite3_3.7.2-1ubuntu0.1_i386.deb
libsqlite3-dev_3.7.2-1ubuntu0.1_i386.debsqlexe.csql_get_table.ctest.db
推荐阅读
- JS中的各种宽高度定义及其应用
- Spark|Spark 数据倾斜及其解决方案
- LSTM网络层详解及其应用实例
- Android|Android sqlite3数据库入门系列
- 《Unix网络编程》第一卷第三版|《Unix网络编程》第一卷第三版 源码编译
- maven使用tomcat7插件编译jsp出错
- 嵌入式(编译内核、根文件系统等)
- 节制及其它
- 第三天-过拟合欠拟合及其解决方案|第三天-过拟合欠拟合及其解决方案,梯度消失梯度爆炸,
- Centos6源码编译安装2.4版本http服务步骤