build spatialite-android/spatialite-android-library error

80 views
Skip to first unread message

luoji...@gmail.com

unread,
May 4, 2015, 3:09:18 AM5/4/15
to spatiali...@googlegroups.com
I want to use Split function,but when the project run,catch exception show "jsqlite.exception:no such function:split",then,I analyzed the source code,in config.h and config-msvc.h:
/* Should be defined in order to enable LWGEOM support. */
/* #undef ENABLE_LWGEOM */
#define ENABLE_LWGEOM 1  //modify here
.....................

/* Define to 1 if you have the <liblwgeom.h> header file. */
/* #undef HAVE_LIBLWGEOM_H */
#define HAVE_LIBLWGEOM_H 1  //modify here

and in \src\gaiageo\gg_lwgeom.c:
.....

#ifdef ENABLE_LWGEOM /* enabling LWGEOM support */

#include <liblwgeom.h>     //lack liblwgeom.h

/* GLOBAL variables */
char *gaia_lwgeom_error_msg = NULL;
char *gaia_lwgeom_warning_msg = NULL;
........

when build again,thows error:
........liblwgeom.h:No such file or directory.....

A quick help appreciated.

Regards,
Robbin


a.fu...@lqt.it

unread,
May 4, 2015, 5:14:07 AM5/4/15
to spatiali...@googlegroups.com
On Mon, 4 May 2015 00:09:17 -0700 (PDT), luoji...@gmail.com wrote:
> I download libjsqlite.so [1] from
>
> https://github.com/geopaparazzi/geopaparazzi/tree/master/geopaparazzispatialitelibrary/libs
> [2].I want to use Split function,but when the project run,catch
> exception show "jsqlite.exception:no such function:split",then,I
> analyzed the source code,in config.h and config-msvc.h:
>
> /* Should be defined in order to enable LWGEOM support. */
> /* #undef ENABLE_LWGEOM */
> #define ENABLE_LWGEOM 1 //modify here
> .....................
>
> /* Define to 1 if you have the header file. */
> /* #undef HAVE_LIBLWGEOM_H */
> #define HAVE_LIBLWGEOM_H 1 //modify here
>
> and in srcgaiageogg_lwgeom.c:
> .....
>
> #ifdef ENABLE_LWGEOM /* enabling LWGEOM support */
>
> #include //lack liblwgeom.h
>
> /* GLOBAL variables */
> char *gaia_lwgeom_error_msg = NULL;
> char *gaia_lwgeom_warning_msg = NULL;
> ........
>
> when build again,thows error:
> ........liblwgeom.h:No such file or directory.....
>
> A quick help appreciated.
>

Hi Robbin,

the "liblwgeom.h" header file is integral part a LWGEOM,
a library supporting advanced Geometry operations initially
developed for PostGIS and now available as a self-standing
module.
anyway in order to build LWGEOM starting from sources you
necessarily have to perform a full build of PostGIS; quite
all major Linux distributions directly ships LWGEOM and its
header files in the standard PostGIS package.

please note: LWGEOM is released under the GPL, so when
building a copy of libspatialite including LWGEOM support
you implicitly accept that libspatialite as a whole will
be subject to the GPL terms. e.g. you are formally forbidden
to link libspatialite and any "non free, closed source"
application.

enabling/disabling LWGEOM is a configure time option:

./configure --enable-lwgeom= [ yes | no ]

(the default setting is NO, so to not necessarily impose
the above mentioned GPL license escalation).

bye Sandro

luoji...@gmail.com

unread,
May 5, 2015, 7:59:07 PM5/5/15
to spatiali...@googlegroups.com


sandro furieri於 2015年5月4日星期一 UTC+8下午5時14分07秒寫道:
Thanks:)
I build successed.
Reply all
Reply to author
Forward
0 new messages