Brad
> Ofcorse can provide some patch and documentation, but this thread was
> just to inform contributors about some small changes in provided
> packages which can make them compilable without deeper knowledge of
> circumstances. But while I am not a contributor, all I can do is to
> share what I ended with, but it is only personalized for our needs.
Your proposed resolutions seem generally applicable. As for not being a
contributor, I can only suggest that your work is already a valuable
contribution to the community. I ask for a patch to make sure that there is no
mis-interpretation of your intent. Its also easy to apply :-)
Brad
> ... Issue around DEF file is common for all opensource
> projects providing options to avoid some functionality.
> I would avoid DEF file and use macros:
>
> #ifdef __WIN32
> #define DLLImport __declspec(dllimport)
> #define DLLExport __declspec(dllexport)
> #else
> #define DLLImport
> #define DLLExport
> #endif
>
the SpatiaLite own code already supports all this:
any "internal" function/symbol (not intended to be
externally visible/accessible) is declared to be
"static", e.g.:
static GEOSGeometry *
buildGeosPoints (const gaiaGeomCollPtr gaia);
static GEOSGeometry *
toGeosGeometry (const gaiaGeomCollPtr gaia);
----------
any other "external" export symbol is declared using
an appropriate prefix (an usual approach adopted by
many open source projects), e.g.:
#ifdef DLL_EXPORT
#define GAIAGEO_DECLARE __declspec(dllexport)
#else
#define GAIAGEO_DECLARE extern
#endif
GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaAllocGeomColl (void);
GAIAGEO_DECLARE void
gaiaFreeGeomColl (gaiaGeomCollPtr p);
----------
this splendidly works when using the GCC compiler
(Linux, Mac Os X, MinGW on Windows).
but anyway this isn't enough when using the M$ own
compiler: AFAIK an explicit DEF file is absolutely
required in order to build any DLL on MSVC [nmake]
quite obviously, maintaining a further separate file
required by a single (proprietary) compiler/platform
is a boring task and an error-prone process.
As Brad already stated, supporting a CMake-based
build-system could be a valid long-term solution so
to support more "odd" proprietary compilers, and not
only the genuine free sw GCC (MinGW on Windows).
Anyway, any third-party contribution allowing for
a simplest and safest usage of MSVC is surely
welcome as an interim solution.
bye Sandro
thanks a lot for your useful suggestions.
I've accepted your proposed patches for the MSVC build
system: and now no silly .DEF file is any longer required.
I've performed a very limited testing using MSVC Express 2010;
anyway it would be surely useful if you could kindly perform
some further test.
FreeXL
======
from the SVN repository [r.17]:
svn co https://www.gaia-gis.it/svn/freexl freexl-svn
or download:
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/freexl-1.0.0.tar.gz
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/freexl-1.0.0.zip
libspatialite
=============
from the SVN repository [r.194]:
svn co https://www.gaia-gis.it/svn/libspatialite lispatialite-svn
or download:
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/libspatialite-3.0.0-beta1.tar.gz
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/libspatialite-3.0.0-beta1.zip
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/libspatialite-amalgamation-3.0.0-beta1.tar.gz
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/libspatialite-amalgamation-3.0.0-beta1.zip
spatialite-tools
================
from the SVN repository [r.50]:
svn co https://www.gaia-gis.it/svn/spatialite-tools patialite-tools-svn
or download:
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/spatialite-tools-3.0.0-beta1.tar.gz
http://www.gaia-gis.it/spatialite-3.0.0-BETA1/spatialite-tools-3.0.0-beta1.zip
bye Sandro