Hello,

I've no Debian to test right now, but I guess that you should link the SOCI
backend library (SQLite3, in your case) with your binary; something like:
$ g++ a.cpp -lsoci_core-gcc-3_0 -lsoci_sqlite3-gcc-3_0

Apparently, the dynamic linker searches for another name of that library.
So, giving it explicitly at compilation time should ease the work of the
dynamic linker.

Just my $0.02

Denis


2010/5/31 Horacio J. Peña <[email protected]>

> Hola!
>
> I've just installed soci but I'm unable to make it work.
>
> $ cat a.cpp
> #include <soci/soci.h>
>
> main()
> {
>        soci::session dbh("sqlite3://a.sq3");
> }

$ g++ a.cpp -lsoci_core-gcc-3_0
>
> $ ./a.out
> terminate called after throwing an instance of 'soci::soci_error'
>  what():  Failed to find shared library for backend sqlite3
> Aborted
>
> $ strace ./a.out 2>&1 | grep sqli
> open("./libsoci_sqlite3.so", O_RDONLY)  = -1 ENOENT (No such file or
> directory)
> write(2, "Failed to find shared library fo"..., 49Failed to find shared
> library for backend sqlite3) = 49
>
>
> The library it should be loading is at
> /usr/local/lib/libsoci_sqlite3-gcc-3_0.so
>
------------------------------------------------------------------------------

_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to