Could not load Spatialite extension in qSqlite ( QT 5.9)
问题 I am trying to load Spatialite as extension in qSqlite ( Qt 5.9), I have done that before with Qt4.8, but I failed with the QT5.9. I changed the sqlite.pri by removing "SQLITE_OMIT_LOAD_EXTENSION", and I did some change on the sqlite.c by removing the " #define SQLITE_OMIT_LOAD_EXTENSION 1 ", and adding " #define SQLITE_ENABLE_LOAD_EXTENSION 1 ". I also add the following lines to openDatabase(....) #if defined(SQLITE_ENABLE_LOAD_EXTENSION) | SQLITE_LoadExtension|SQLITE_LoadExtFunc #endif Now