On Tue, 1 Jun 2021 03:12:57 -0700 (PDT), David Hoogenbosch wrote:
> Hello Wuping,
> I've been trying to build spatialite using msvc (to use it in a c#
> project with system.data) and have not been able to make it work.
> I've build sqlite, librttopo and geos but get stuck on the proj
> When building proj (6.3.2) I get get a "proj_d.lib" file. While
> spatialite fails to link because it is missing "proj_i.lib".
> I get the feeling I have taken a wrong turn somewhere because
> has been a pain at every turn.
just a first remark: please notice that proj 6.3.2 is obsolete
nowadays, the current updated version is 8.0.1 released last
second remark: there ara basically two alternative approaches
for building lisbaptiatilite on Windows platforms:
1. using the MinGW compiler on the MSYS2 shell.
this is a very decent emulator of the development
environment typical of Linux, and will make easier
and painless building open source libraries.
This one is the solution adopted by SpatiaLite
itself for building its own binary packages for
Windows, and you'll find very detailed and
frequently updated "recipes" from here:
2. alternatively you can use the MSVC compiler.
in this case (as already reported by Wuping)
you simply have to use "nmake" using one
of the two MSVC Makefiles contained into the
sources tarball (makefile.vc
and installing all the other depending precompiled
libraries (PROJ, GEOS etc) from the standard
attempting to build from scratch the complete
pile of depending libraries using the MSVC
compiler will surely be a long and tiring
affair (and presumably frustrating), bacause
many of them are mainly intended for Linux
and will almost certainly require to apply
several manual patches in order to build
smoothly on Windows.
dowloading the pre-built libraries from OSGeo4w
will surely make easier and faster your work.