sqlite - Compiled libsqlite3.so doesn't work on CentOS 5.9 x86 -


i've compilled sqlite sources (version 3.7.16.1) under centos 5.9 32bit. compilled i'm unable link against or use anyhow.

i'm compilling this:

cflags="-dsqlite_enable_column_metadata -dsqlite_enable_unlock_notify -lstdc++" ./configure --enable-shared --enable-static=no 

and when try link against it, i'm getting:

[sysadm@depon-460sf2 ~]$ gcc main.c -l /home/sysadm/libsqlite3.so.0.8.6 /usr/bin/ld: cannot find -l/home/sysadm/libsqlite3.so.0.8.6 

i call gcc under same system sqlite built under. ldd seems fine:

[sysadm@depon-460sf2 ~]$ ldd /home/sysadm/libsqlite3.so.0.8.6         linux-gate.so.1 =>  (0x00f2f000)         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x002d4000)         libdl.so.2 => /lib/libdl.so.2 (0x00110000)         libpthread.so.0 => /lib/libpthread.so.0 (0x002ac000)         libc.so.6 => /lib/libc.so.6 (0x00115000)         libm.so.6 => /lib/libm.so.6 (0x004d2000)         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x008d9000)         /lib/ld-linux.so.2 (0x0055e000) 

what doing wrong?

this not how the -l option works.

you must specify library name, not file path, , specify directory library search path:

gcc ... -l/home/sysadm/ -lsqlite3 

Comments