On Tue, 3 Nov 2015 20:40:12 -0800 (PST),
dissertat...@gmail.com
wrote:
> Are there Windows pre-built development libraries for the latest
> version 4.3?
>
the SpatiaLite project directly distributes binary executables
for Windows platforms (both 32 and 64 bit), anyway _only_ the
dynamically loadable extension module (mod_spatialite) is
supported, not the classic linkable library.
1. our Windows binaries are always built using the MinGW
compiler, not MSVC, and .lib objects are non-standard
objects required only by MSVC.
2. mod_spatialite is a pure loadable module, not a classic
dynamic library. you can never directly link mod_spatialite,
you absolutely need to call the SQLite's own "load_extension"
API in order to dynamically load the module at run-time.
> I tried creating my
> own import libraries for mod_spatialite.dll using dumpbin/lib but
> that
> DLL doesn't seem to export all the functions. For example,
> spatialite_init_ex and spatialite_cleanup_ex are not there.
>
exactly: this simply is because mod_spatialite is a pure
loadable module. it's a DLL, but a someway special DLL just
exporting external symbols expected by "load_extension";
if you are searching for a classic library exporting all
link symbols it's libspatialite, not mod_spatialite.
You can read more technical details from here:
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=mod_spatialite
> Is there a dll pre-built with all the functions exported and import
> library available?
>
yes, please look at the OSGeo4W distribution:
http://trac.osgeo.org/osgeo4w/
it's slightly outdated, but it's specifically intended to
support MSVC C/C++ developers.
the SpatiaLite project itself does not supports MSVC in any
way simply because this will add too much further complexity.
> I tried building the library with partial success. I could
> get spatialite.dll to build but the GEOS dependent functions were
> giving strange results.
>
a. the simpler and easier solution on Windows is building
libspatialite (and all required dependencies) using
the MinGW compiler. here you can find several useful hints:
http://www.gaia-gis.it/gaia-sins/mingw_how_to.html
http://www.gaia-gis.it/gaia-sins/msvc_how_to.html
b. the harder solution is building libspatialite (and all
related dependencies) using the MSVC compiler.
it could probably be a really difficult task and will
surely require a long time.
c. a very reasonable alternative solution is to adapt
to MSVC the usual strategy adopted by Java, .NET,
Python, PHP and many other languages, i.e. just
loading mod_spatialite at run time by executing
a "load_extension" SQLite call immediately after
establishing a DB connection.
bye Sandro