Hi

> 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.
>



Thanks again for your very helpful post explaining the problem.

As you pointed out the shared library couldn't be found at run time,
(for the benefit of others I verified this by typing ldd test). I
considered the options that you suggested, in the end the solution I
went for is to pass the following compiler option  -Wl,-rpath
/<user_account>/sqlite/lib  to GCC, which solves my problem.


>
> Could you check whether your PHP installation includes PDO? PDO offers a
> sqlite3 driver, and you could perhaps use that one.
>

As regards PHP and PDO, its not listed on the phpinfo page output from
my server and I have a vague recollection of trying the PDO sqlite3
driver before but it failed.

Thanks again for your help
Daniel
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to