Anders Persson wrote:
i try to compile it with
gcc --static -I../sqlite -L../sqlite/.libs -o db-test db-test.c -lsqlite3

But i get errors like
Undefined                       first referenced
symbol                             in file
fdatasync                           ../sqlite/.libs/libsqlite3.a(os_unix.o)
ld: fatal: Symbol referencing errors. No output written to db-test
collect2: ld returned 1 exit status

man fdatasync on solaris will tell you that you need to add -lrt for fdatasync.

so do something like
gcc --static -I../sqlite -L../sqlite/.libs -o db-test db-test.c -lsqlite3 -lrt

Cheers,
Phuah Yee Keat

Reply via email to