Hi,

I'm a new user of sqlite, i want to test utilization of sqlite in a C program.
So I generated a static lib of sqlite (using the amalgamation files) and I try 
to use it in my C program.
But I get some error. Below my compilation code and the return error.
The program that I wanted test is the C program on this page : 
http://www.sqlite.org/quickstart.html

root@ubuntu:/home/y_sako/Documents/sqlite-amalgamation-3071100# gcc -c shell.c
root@ubuntu:/home/y_sako/Documents/sqlite-amalgamation-3071100# gcc -c sqlite3.c
root@ubuntu:/home/y_sako/Documents/sqlite-amalgamation-3071100# ar -rv 
libsqlite.a shell.o sqlite3.o
ar: creating libsqlite.a
a - shell.o
a - sqlite3.o
root@ubuntu:/home/y_sako/Documents/sqlite-amalgamation-3071100# gcc -lsqlite -o 
compil compil.c

/tmp/ccBIvSMw.o: In function `main':

compil.c:(.text+0xc3): undefined reference to `sqlite3_open'

compil.c:(.text+0xda): undefined reference to `sqlite3_errmsg'

compil.c:(.text+0x101): undefined reference to `sqlite3_close'

compil.c:(.text+0x138): undefined reference to `sqlite3_exec'

compil.c:(.text+0x16d): undefined reference to `sqlite3_free'

compil.c:(.text+0x179): undefined reference to `sqlite3_close'

collect2: ld a retourné 1 code d'état d'exécution

can someone explain me what is the problem ?
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to