Spatialite和iOS [英] Spatialite and iOS

查看:293
本文介绍了Spatialite和iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建最新版本的Spatialite,以便在iOS平台上使用,并且没有取得多大进展。我已经下载了以下库的最新版本,并尝试将它们放入一个项目(每个项目作为自己的目标)并将它们构建为一个静态库。

I am trying to build the latest version of Spatialite for use on the iOS platform and am not making much progress. I have downloaded the latest version of the following libraries, and have attempted to bring them into one project (each as their own target) and build them as one static library.


  • Spatialite(3.0.1合并)

  • GEOS(每晚建于20121114)

  • PROJ.4(4.8.0) )

每次下载都包含许多与scrips,标题和源代码混合在一起的文件。目前还不清楚这里的步骤,哪个应该加载,哪个不应该加载。我已经尝试将每个目录中的所有文件都引入到他们自己的组中,但没有用,我在第2步遇到困难,因为我的Xcode版本与示例中使用的版本不同。当添加PROJ.4位时,Xcode询问我是否要创建外部构建系统项目。

Each download contains dozens of files intermingled with scrips, headers and source code. It is unclear from the steps here, which should be loaded and which shouldn't. I have tried bringing in all the files in each directory into their own group, to no avail and I get stuck at Step 2 because my version of Xcode is different from that used in the example. When adding the PROJ.4 bits Xcode asks me if I want to create an "external build system project."

我也试过从这个发布并更新所有软件的版本。不幸的是,Xcode在新的源代码中抛出了数十个警告,并且还抛出了一些错误。如有必要,我可以分享。更进一步,我甚至采取了他的输出(静态库和标题)并将它们带入另一个项目,但由于某种原因,编译器抛出错误,说他们找不到sqlite3。我已经将SQLite3添加到项目中,但它没有清除。

I have also tried taking Lionel's project from this post and updating the versions of all the software. Unfortunately Xcode throws dozens of warnings in the new source and throws a few errors as well. I can share those if necessary. Going further, I've even taken his output (a static library and headers) and brought them into another project, but for some reason the compiler is throwing errors saying they it can't find "sqlite3." I've added SQLite3 to the project but it didn't clear things up.

我也试过跟进这个 thread ,但我无法问问题所以我不能问原始用户他/她是如何完成这个的。

I have also tried following up on this thread, but I'm not able to ask questions and so I can't ask the original user how he/she accomplished this.

最后,一个问题:

有谁知道如何使用Xcode 4.5和iOS 6构建最新版本的Spatialite及其伴随库(GEOS,PROJ.4)?

Does anyone know how to build the latest version of Spatialite and its companion libraries (GEOS, PROJ.4) with Xcode 4.5 and iOS 6?

如果是这样,你能分享一下你是怎么做到的吗?我想从概念上理解发生了什么。

If so, can you share how you did it? I'd like to understand conceptually what is happening as well.

推荐答案

通过CocoaPods:

为pod安装安装依赖项

install dependencies for pod install

brew install automake autoconf libtool

然后在您的XCode项目中添加您的Podfile模板:

then add your Podfile template inside your XCode project:

pod init

添加spatialite pod依赖项:

Add spatialite pod dependency:

vi Podfile

并在主目标中添加此行

pod 'spatialite', '4.1.1'

如果Podfile中有现有项目,则添加工作区

Add workspace if existing project inside Podfile

workspace 'YourWorkspaceName'

运行

pod install

高枕无忧。完成后使用XCode打开工作区

sit back and relax. When finished open the workspace with XCode

这篇关于Spatialite和iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆