max
max

Reputation: 10464

error when trying to link libraries

I am trying to compile my c code on linux i386. I have the sqlite3 library at:

/usr/lib/i386-linux-gnu/libsqlite3.so.0
/usr/lib/i386-linux-gnu/libsqlite3.so.0.8.6

but the linker does not find them. I even specified the path manually with the -L option which I suspect is not necessary:

cc -pthread -L/lib/i386-linux-gnu -L/usr/lib/i386-linux-gnu -L../i386/debug/lib/ ./bin/i386/debug/*.o  -lsculib -lpthread -lsqlite3 -o ../i386/debug/bin/myProgram
/usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
make: *** [../i386/debug/bin/core] Error 1

any ideas why it does not find them?

Upvotes: 0

Views: 88

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 179194

Presumably, you also need the header files.

$ sudo apt-get install libsqlite3-dev

Upvotes: 1

Related Questions