Daniel Larkin wrote:
Thanks for the super fast response! and for the clarification on how
I should be using the linker.
Most welcome.
My test program now compiles and links,
but when I try to run it I get a run time error saying"
"test: error while loading shared libraries: libsqlite.so.0: cannot
open shared object file: No such file or directory"
I double checked that the libsqlite.so.0 exists in the given directory
and it does, so am not sure why I'm getting this message?
Just because the library is found at link time doesn't mean it's going
to be found at runtime. You'll have to add the directory hosting the
shared library to the runtime library search path, which is controlled
by the /etc/ld.so.conf file and the environment variable LD_LIBRARY_PATH.
You can either launch your test program with the altered path on the
command line, such as:
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/<user_account>/sqlite/lib" ./test
or you can write a small shell script wrapper to launch your program,
i.e. save the above command to a text file, containing the next two lines:
#!/bin/sh
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/<user_account>/sqlite/lib" ./test
then make the created file executable via:
chmod +x your_wrapper_scriptname
and run it, or you can alter the systemwide library search path in
/etc/ld.so.conf then run /sbin/ldconfig, but I strongly advise against that.
Incidentally I'm using version 2.8 because I ultimately want to create
a little application that uses c++ and displays results in a php
website, but sqlite3 doesn't seem to be supported in the local
installed version of php with apache on my server and I don't have
root access to address this, whilst sqlite version 2.8 seems to work
with php/apache on my webserver.
Could you check whether your PHP installation includes PDO? PDO offers a
sqlite3 driver, and you could perhaps use that one.
HTH,
Mihai
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users