[gdal-dev] OGR2SQLITE_static_register

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] OGR2SQLITE_static_register

Alan Stewart-2

GDAL 1.11.0. We use a libspatialite 4.2.0 DLL.

 

From ogrsqlitevirtualogr.cpp:

 

void OGR2SQLITE_Register()

{

    sqlite3_auto_extension ((void (*)(void)) OGR2SQLITE_static_register);

}

 

I’m trying to open an mbtiles file. Sqlite3_auto_extension() throws when executed.

 

Thanks for any info or suggestions.

 

Alan Stewart

Senior Software Engineer

TerraGo Technologies

3200 Windy Hill Road, Suite 1550W

Atlanta, GA 30339 USA

O.  +1 678.391.9615

 

<a href="applewebdata://B24C0762-C7C9-4431-8518-ACC915448B89/www.terragotech.com">www.terragotech.com

 


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: OGR2SQLITE_static_register

Even Rouault-2

On mercredi 4 octobre 2017 08:30:33 CEST Alan Stewart wrote:

> GDAL 1.11.0. We use a libspatialite 4.2.0 DLL.

 

I'd say: time to upgrade your GDAL version.

 

Looking at recent GDAL versions, I see this comment:

 

/* We call this function so that each time a db is created, */

/* OGR2SQLITE_static_register is called, to initialize the sqlite3_api */

/* structure with the right pointers. */

/* We need to declare this function before including sqlite3ext.h, since */

/* sqlite 3.8.7, sqlite3_auto_extension can be a macro (#5725) */

 

Apparently this was fixed in GDAL 1.11.2:

* fix segmentation fault when executing OGR2SQLITE_Register() when compiling against sqlite 3.8.7 (#5725)

 

So you're likely using too-old-GDAL with too-recent-sqlite3.

 

Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev