On Wed, 29 Sep 2004, Max wrote:
>I'm trying to compile this little example from www.sqlite.org
>
[snip]
>
>I compile this program : gcc pippo.c -o pippo
>
>But the result is :
>
>/tmp/ccH7jM5Y.o: In function `main':
>/tmp/ccH7jM5Y.o(.text+0xd5): undefined reference to `sqlite3_open'
>/tmp/ccH7jM5Y.o(.text+0xf2): undefined reference to `sqlite3_errmsg'
>/tmp/ccH7jM5Y.o(.text+0x117): undefined reference to `sqlite3_close'
>/tmp/ccH7jM5Y.o(.text+0x14c): undefined reference to `sqlite3_exec'
>/tmp/ccH7jM5Y.o(.text+0x180): undefined reference to `sqlite3_close'
>collect2: ld returned 1 exit status
>
>Why?
You need to link against the SQLite library:
$ gcc pippo.c -o pippo -lsqlite
Christian
--
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X - AGAINST MS ATTACHMENTS
/ \