On Wed, 29 Sep 2004, Max wrote:
You need to link against the SQLite library: $ gcc pippo.c -o pippo -lsqlite
Nothing the result is the same ..
you need to link against the sqlite version 3 library (you've probably succesfully linked against a version 2 library on your system).
try something like
gcc pippo.c -o pippo -L/full/path/to/directory/with/sqlite3lib/ -lsqlite
afterwards run something like
ldd pippo
this should show that your binary points to the sqlite3 lib. because of the error i'm guessing you have the sqlite 2 lib in a standard place and the sqlite 3 lib in a non-standard place. this give you an additional problem: at runtime your binary will load the wrong lib. you have two fixes
(a)
once
~ > export LD_RUN_PATH=/full/path/to/directory/with/sqlite3lib/
~ > gcc pippo.c -o pippo -L/full/path/to/directory/with/sqlite3lib/ -lsqliteeverytime
~ > ./pippo
(b)
once
~ > gcc pippo.c -o pippo -L/full/path/to/directory/with/sqlite3lib/ -lsqlite
everytime
~ > export LD_LIBRARY_PATH=/full/path/to/directory/with/sqlite3lib/
~ > ./pippodo a man ld.so if this does not make sense.
cheers.
-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it. | --Dogen
===============================================================================

