如何为iOS编译spatialite
我是新来的,这是我的第一个主题。我对 iOS 平台非常陌生,我正在尝试使用 sqlite3 的空间扩展,但我无法做到这一点。这让我抓狂。我不知道如何以及从哪里开始。有人可以给我建议吗?
谢谢。
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 crazy. I don't know how and where do i start. Can someone give me suggestion?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我是在 http:// 上共享库的人;-)
我在简化 iOS 版 spaceite 的集成方面取得了一些良好进展。
现在我可以构建一个完全独立的spatialite 静态库(2.3.1,嵌入所需的 GEOS 和 PROJ,这样就不必占用它们)。
只需下载 zip http://lionel.gueganton.free.fr/spatialite/ spaceite2.3.1.zip,您将获得 x86 和 arm + 标头的 .a,以便您可以直接使用这些标头中的 spaceite 接口。
拖放 .a 后(两者都需要在模拟器和真实硬件上工作),您只需调用
spatialite_init(1)
即可初始化 Spatialite。您的控制台日志上应显示以下内容:
<代码>
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:
卷起来,卷起来,趁热拿走!
大师们,谷歌福这一项就强了!
不能说我写了这个(我确实计划为 iPhone SQLite 和 Spatialite 提供 CMake 脚本,很快就会实现),但我建议你自己开始< a href="http://lionel.gueganton.free.fr/spatialite/" rel="nofollow">此网站,404 之前:
http://lionel.gueganton.free.fr/spatialite/
去下载一些好东西,包括预编译的 Spatialite + 扩展 2.3.1 二进制文件!
有一个SQLite-on-OSX Cmake脚本(最初发现此处),可能只需很少的工作,就可以重新定位SQLite-iPhone 构建(我一有时间就会做)。这应该允许您使用最新的 SQLite 版本(我读到 Apple 包含的版本略有缺陷)。然后,据说,您只需以本地方式引用new头文件,即使用引号
(例如“sqllitexxx.h”)
而不是使用尖括号:(
) h> )那么,我能得到那些有趣的点吗;-) ?
干杯
大富翁
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
您可能必须编译到armv7目标(优化构建),您还应该链接到stdlib++.dylib。
You may have to compile to armv7 target (optimised build), you should also link with stdlib++.dylib.
Spatialite for iOS 只需 3 个简单步骤:
向 Gustaf Lindqvist 致敬,让其可用!
Spatialite for iOS in 3 easy steps:
Hat tip to Gustaf Lindqvist for making this available!