Reputation: 11
my makefile can't find my sqlite3 library, I want to link it with a -lsqlite3 flag in the gcc commandline. Can someone tell me want I am doing wrong here. The error message is the following:
/usr/bin/ld: cannot find -lsqlite3
tom
Upvotes: 0
Views: 2677
Reputation: 798666
You forgot to pass -L
followed by the directory containing the SQLite library. You can also use pkg-config sqlite3 --libs
to get the appropriate linker flags.
Upvotes: 1
Reputation: 224944
These days you can just download the amalgamation and build it in with your project. No more worrying about library locations and architecture matching!
For more details with your exact problem, you'll need to show us the full command line you're using.
Upvotes: 1