stackoverflow
stackoverflow copied to clipboard
SpatialiteOnQt : "Unable to execute statement" "no such function : load_extension"
Hi, I tried to use your provided example in stackoverflow but I faced this error.
"Unable to execute statement" "no such function : load_extension"
Is there any solutions for that?
thanks
What is your OS, what version of sqlite and Qt do you have?
Hi, I tried to use your provided example in stackoverflow but I faced this error.
"Unable to execute statement" "no such function : load_extension" Is there any solutions for that? thanks
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eyllanesc/stackoverflow/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AEq1yPmaSXeGc7Gae_ERtlvhaV1JLauqks5s8aRzgaJpZM4Qzbll .
@eyllanesc I am on Linux unbuntu and QT 5.9.1 and SQLite version 3.16.2 2017-01-06 16:32:41 This is output of your application
Error: cannot load the Spatialite extension ( "no such function: load_extension Unable to execute statement" )
0
true
false
0 false
1 false
2 false
3 false
4 false
5 false
6 false
7 false
8 false
9 false
false
You have installed the spatialite development package: libspatialite-dev and libsqlite3-mod-spatialite?
@eyllanesc yes I can call SELECT load_extension('mod_spatialite') directly from any sqlite db manager and it works. Do I need recompile QT's sqlplugin?
I did not have the need to do so, reviewing several forums I have seen several suggest recompiling the sqlplugin adding the following: sqlite.pri:
DEFINES += SQLITE_ENABLE_LOAD_EXTENSION SQLITE_ENABLE_RTREE SQLITE_OMIT_COMPLETE