What is your make file?  It seems to be missing a link library.

Samuel Baldwin wrote:
> Howdy. When I try to compile the small C program at the bottom of
> http://www.sqlite.org/quickstart.html , I get the following errors:
> 
> arrakis^library% gcc test.c
> test.c: In function ‘main’:
> test.c:21: warning: incompatible implicit declaration of built-in
> function ‘exit’
> test.c:27: warning: incompatible implicit declaration of built-in
> function ‘exit’
> /tmp/ccYuZFw7.o: In function `main':
> test.c:(.text+0xc0): undefined reference to `sqlite3_open'
> test.c:(.text+0xd2): undefined reference to `sqlite3_errmsg'
> test.c:(.text+0xf4): undefined reference to `sqlite3_close'
> test.c:(.text+0x123): undefined reference to `sqlite3_exec'
> test.c:(.text+0x14f): undefined reference to `sqlite3_free'
> test.c:(.text+0x158): undefined reference to `sqlite3_close'
> collect2: ld returned 1 exit status
> 
> The warnings about exit() are removed if I add #include <stdlib.h>,
> but then I'm left with:
> 
> arrakis^library% gcc test.c
> /tmp/ccENlzA6.o: In function `main':
> test.c:(.text+0xc0): undefined reference to `sqlite3_open'
> test.c:(.text+0xd2): undefined reference to `sqlite3_errmsg'
> test.c:(.text+0xf4): undefined reference to `sqlite3_close'
> test.c:(.text+0x123): undefined reference to `sqlite3_exec'
> test.c:(.text+0x14f): undefined reference to `sqlite3_free'
> test.c:(.text+0x158): undefined reference to `sqlite3_close'
> collect2: ld returned 1 exit status
> 
> I'm really not sure what else to do. I've tried this on two machines
> running two seperate linux distributions, and friends have confirmed
> the same error on yet other machines. Is the sample code just
> outdated? Looking over it and sqlite3.h makes me think it should work.
> 
> I'm running sqlite3 3.6.13
> 
> Thanks, I'm completely baffled.
> 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to