how to compile spatialite for iOS

后端 未结 4 945
面向向阳花
面向向阳花 2020-12-01 05:38

I am new here and this is my first topic. I am very new on iOS platform and i am trying to use spatialiate extension with sqlite3 but i couldn\'t do this. It is making me cr

相关标签:
4条回答
  • 2020-12-01 06:16

    You may have to compile to armv7 target (optimised build), you should also link with stdlib++.dylib.

    0 讨论(0)
  • 2020-12-01 06:25

    Spatialite for iOS in 3 easy steps:

    1. Get the Makefile and patch from https://github.com/gstf/libspatialite-ios
    2. Type make
    3. There is no step 3

    Hat tip to Gustaf Lindqvist for making this available!

    0 讨论(0)
  • 2020-12-01 06:30

    Roll up, Roll up, get them while they're hot!

    Masters, the Google-fu is strong in this one!

    Can't say I wrote this (I do plan on having CMake scripts for both iPhone SQLite and Spatialite, sometime real soon), but I suggest you get yourselves over to this site, before 404:

    http://lionel.gueganton.free.fr/spatialite/

    go download you some goodies, including pre-compiled Spatialite + extensions 2.3.1 binaries!!!.

    There is an SQLite-on-OSX Cmake script (originally found here), which, with probably little work, should be re-targetable at SQLite-iPhone builds (I'll do it, just as soon as I get the time). This should allow you to use the latest SQLite version (I've read that the Apple-included version is slightly crippled). Then, supposedly, you just have to reference the new header files in a local manner, i.e. using quotes

    (e.g. "sqllitexxx.h")

    instead of using angle brackets:

    (<sqllitexoldx.h>)

    So, do I get those juicy points ;-) ?

    Cheers

    Big Rich

    0 讨论(0)
  • 2020-12-01 06:38

    I'm the guy who shared the libs on http:// ;-) I did some good progress on easing the integration of spatialite for iOS. Now I'm able to build a fully standalone static library of spatialite (2.3.1 that embeds the required GEOS and PROJ so that don't have to take car of them).

    Just download the zip http://lionel.gueganton.free.fr/spatialite/spatialite2.3.1.zip and you'll get the .a for x86 and arm + headers so that you can use directly the spatialite interface from those headers.

    Once you've drag n drop the .a (both are required to work in the simulator AND on the real hardware), you can initialize spatialite by just invoking spatialite_init(1).

    The following should be displayed on your console log:

    SpatiaLite version ..: 2.3.1    Supported Extensions:
        - 'VirtualShape'    [direct Shapefile access]
        - 'VirtualText      [direct CSV/TXT access]
        - 'VirtualNetwork   [Dijkstra shortest path]
        - 'RTree'       [Spatial Index - R*Tree]
        - 'MbrCache'        [Spatial Index - MBR cache]
        - 'VirtualFDO'      [FDO-OGR interoperability]
        - 'SpatiaLite'      [Spatial SQL - OGC]
    PROJ.4 version ......: Rel. 4.6.1, 21 August 2008
    GEOS version ........: 3.1.1-CAPI-1.6.0
    

    0 讨论(0)
提交回复
热议问题