🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

sqlite-3.5.1.so related question

Started by
6 comments, last by vallentin 16 years, 7 months ago
I have the above mentioned so and I don't know how to link with it.Does anyone know how to link in linux?The sqlite..so may be found on the download page
Advertisement
when linking "-l" is used for linking libs. (-l works only on files which begin with "lib" I believe)
e.g.:
-lsqlite-3.5.1

"-L" adds library paths.
e.g. -L/usr/local/lib


Btw it !should! be named "libsqlite-3.5.1.so"?!


Your command might look like $ g++ -o test test.c -lsqlite-3.5.1


hope that helps
I missed a header file.?Nevertheless where should I put the so so that the system should see it at link time and runtime
Libs installed by hand should reside in /usr/local/lib.
...and the header file in /usr/local/include

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

So,I have now a
libsqlite-3.5.2.so in /usr/local/lib
and a
sqlite3.h in my local directory
how do I link?

It keeps saying : /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/local/lib/libsqlite-3.5.2.so when searching for -lsqlite-3.5.2

And my command was:
gcc -lsqlite-3.5.2 -o study study.c
This (seems to) mean that you libsqlite is wrong in a way. Most likely because the lib is 32bit and you got a 64bit system or the other way round.
it seems this is the only explanation possible

This topic is closed to new replies.

Advertisement