Using Spatialite within C++ - locating .lib and .h files

10 views
Skip to first unread message

ckgoo...@gmail.com

unread,
Jun 22, 2024, 3:50:54 AM (11 days ago) Jun 22
to spatiali...@googlegroups.com

Hello all,

I want to make use of Spatialite within my C++ application and normally I’d expect to do this by linking a .lib and including a .h file in my project as well as linking to a .dll.  So far I can only locate .dll files.  Do the .lib and .h files exist in a Windows 64-bit distributable?

Kind regards, Chris

a.fu...@lqt.it

unread,
Jun 22, 2024, 4:33:28 AM (11 days ago) Jun 22
to spatiali...@googlegroups.com
Hi Chris,

the Windows distribution's DLLs are not intended to be linked in
the most classic way but to be loaded dynamically at run-time.

simply put, your app code only needs to execute a particular
SQL statement immediately after opening a new SQLite connection
to load and activate the SpatiaLite extension.

SELECT load_extension('mod_spatialite');

it works on any known programming language (Java, Python,
PHP etc) and of course it also works on C/C++

for further information:
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=mod_spatialite

bye Sandro

ckgoo...@gmail.com

unread,
Jun 22, 2024, 5:43:18 AM (11 days ago) Jun 22
to spatiali...@googlegroups.com
Thanks Sandro, I will give that a go.
Best, Chris
--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spatialite-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/58f377efe8d36944433af58b1b788f63%40lqt.it.

Reply all
Reply to author
Forward
0 new messages