我在构建现有项目时遇到了一些麻烦:
http://code.google.com/p/spatialite-android/
我正在使用 Win7 和 Cygwin
我通过使用“GIT for Windows”进行克隆来获取源代码。将其放入:C:\temp\ECLIPSE\workspace\SA1
我下载以下内容:
- http://download.osgeo.org/geos/geos-3.2.2.tar.bz2
- ftp://ftp.remotesensing.org/proj/proj-4.7.0.tar.gz
我把它们放在:C:\temp\ECLIPSE\workspace\SA1\spatialite-android-library\jni
然后我启动 Cygwin 并执行以下操作:
$ cd c:/temp/eclipse/workspace/sa1/spatialite-android-library/jni
$ tar xvjf geos-3.2.2.tar.bz2
$ cd geos-3.2.2
$ ./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
在 Cygwin 之外,我在编辑器中打开: C:\temp\ECLIPSE\workspace\SA1\spatialite-android-library\jni\geos-3.2.2\source\headers\geos\platform.h 并进行一些更改它类似于下面
/* 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
保存并关闭
然后我回到 Cygwin 并执行以下操作:
$ cd ..
$ tar xvzf proj-4.7.0.tar.gz
$ cd proj-4.7.0
$ ./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
$ cd ..
$ /cygdrive/c/android-ndk-r8/ndk-build
与 Compile++ 行一起,以下编译
StaticLibrary : libiconv.a
StaticLibrary : libproj.a
但是,当它通过geos时,会出现以下错误:
Compile++ thumb : geos <= TaggedLineSegment.cpp
Compile++ thumb : geos <= TaggedLinesSimplifier.cpp
Compile++ thumb : geos <= TaggedLineString.cpp
Compile++ thumb : geos <= TaggedLineStringSimplifier.cpp
Compile++ thumb : geos <= TopologyPreservingSimplifier.cpp
Compile++ thumb : geos <= Assert.cpp
Compile++ thumb : geos <= GeometricShapeFactory.cpp
Compile++ thumb : geos <= math.cpp
Compile++ thumb : geos <= Profiler.cpp
Prebuilt : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/libs/armeabi/
StaticLibrary : libgeos.a
make: execvp: /cygdrive/c/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-ar: Argument list too long
make: *** [/cygdrive/c/temp/eclipse/workspace/sa1/spatialite-android-library/obj/local/armeabi/libgeos.a] Error 127
HFisher@Toshiba500 /cygdrive/c/temp/eclipse/workspace/sa1/spatialite-android-library/jni
$
有人可以帮助我解决这个问题吗?非常感谢任何帮助!