On Sun, 22 Oct 2017 01:46:45 -0700 (PDT), Tara wrote:
> In my directory (C:spatialite) I have following files:
> * libfreexl-1.dll
> * libgcc_s_dw2-1.dll
> * libgeos_c-1.dll
> * libgeos-3-5-0.dll
> * libiconv-2.dll
> * liblzma-5.dll
> * libproj-9.dll
> * libsqlite3-0-dll
> * libstdc++-6.dll
> * libxml2-2.dll
> * mod_spatialite.dll
> * sqlite3.dll
> * sqlite3.exe
> * zlib1.dll
> * my_database.sqlite
>
> I downloaded the mod_spatialite-4.3.0a-win-x86.7z [1] from this site
> (
http://www.gaia-gis.it/gaia-sins/windows-bin-x86/ [2]), which
> contained already all DLL files....
>
> the sqlite-dll-win32-x86-3200100.zip [3] is from
>
https://sqlite.org/download.htm. [4]
>
Hi Tara,
you have already installed a SQLite DLL (libsqlite3-0-dll);
there is absolutely no reason to install a second copy
(sqlite3.dll). It's not only useless, it could even be
dangerous, because the two DLLs have been compiled by
different compilers (MinGW vs MSVC) and are of different
versions.
> I extracted both files and added to my path (C://spatialite).
> First the SQLlite archive then mod_spatialite, and overwrote
> any files. I also added the folder to the system path.
>
I'm unable to exactly understand what you've really done;
could you report the precise syntax of your commands ?
> I got this error message:
> the procedure entry point
> "_ZNSt8_detail15_List_node_base11_M_transferEPS0_S1_"
> could not be located in the DLL "C:\spatialite\libgeos-3-5-0.dll"
>
I've checked (by using the "nm" tool) the link symbols declared
by libgeos-3-5-0.dll (compiled by the MinGW compiler); it contains
the "__imp___ZNSt8__detail15_List_node_base11_M_transferEPS0_S1_"
symbol (please notice the "__imp__" decoration), and this fully
accounts for your reported failure.
The most obvious cause explaining such a mismatch is in that
you are actually using badly mixed DLLs of different origins
and probably created by different compilers (symbol's decorations
are handled in different ways by different compilers).
The following is a very simple diagnostic check:
1. open a cmd.exe command shell
2. type: cd C:\spatialite
this will change your current working directory
3. type: set PATH=.
this will restrict searching all DLLs only within
the current working directory
4. type: sqlite.exe
5. type: SELECT load_extension('mod_spatialite');
6. type: SELECT spatialite_version();
the expected result is "4.3.0"
if this test successfully passes (as I'm expecting), we
can then positively confirm that all DLLs downloaded
from within "mod_spatialite-4.3.0a-win-x86.7z" are
correctly working.
and in this case your next step will be the one to
understand why your application do actually loads
DLLs from different locations; the most probable
cause should be a badly set %PATH% variable.
hint: your actual %PATH% should not only cover all
required directories, but should also ensure the
right searching priorities.
bye Sandro