【问题标题】:SpatialLite for Android NDK Geos Configure ErrorSpatialLite for Android NDK Geos 配置错误
【发布时间】:2012-02-24 13:12:44
【问题描述】:

我正在尝试为 Android 构建以下项目:

http://code.google.com/p/spatialite-android/

有谁知道为什么在 LineIntersector.cpp 运行 ndk-build 时可能会出现错误?

jni/geos-3.2.2/source/algorithm/LineIntersector.cpp:223: error: expected unqualified-id before '(' token

我正在尝试在 Mac 上编译它,我是 NDK 新手。这是我在 geos 根目录中运行的配置

./configure --build=i686-android-linux-gnu --host=arm-linux-eabi

错误似乎与 ISNAN 函数有关

【问题讨论】:

标签: android android-ndk geospatial geos spatialite


【解决方案1】:

目前您只能在 Ubuntu 上构建。您运行./configure 的步骤是其他平台上的问题。我在下载部分发布了最新的二进制文件。您可以打开 apk 并复制 .so 文件。

我能够通过编辑 /source/headers/geos/platform.h 在我的 Mac 上构建 geos

/* Set to 1 if you have `int64_t' type */
/* #undef HAVE_INT64_T_64 */

/* Set to 1 if `long int' is 64 bits */
/* #undef HAVE_LONG_INT_64 */

/* Set to 1 if `long long int' is 64 bits */
/* #undef HAVE_LONG_LONG_INT_64 */

/* Set to 1 if you have ieeefp.h */
/* #undef HAVE_IEEEFP_H */

/* Has finite */
#define HAVE_FINITE 1

/* Has isfinite */
/* #undef HAVE_ISFINITE */

/* Has isnan */
#define HAVE_ISNAN 1

【讨论】:

  • 这必须在运行 ./configure 后完成。修改 platform.h 后,运行 ndk-build 即可。谢谢
【解决方案2】:

我已经在Win7,cygwin环境下成功构建了这个项目,看看: http://code.google.com/p/spatialite-android/issues/detail?id=3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-05-26
    • 2013-10-09
    • 2018-05-01
    • 2018-05-05
    • 2015-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多