2012-06-25 3 views
3

구축을 위해 : Spatialite 안드로이드 NDK 내가에서 빌드 약간의 문제를 기존 프로젝트를 데

나는 Windows 용 "GIT를 사용하여 복제하여 소스 코드를 얻을 내가 Win7에 Cygwin에서

을 사용하고

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

을 ". C :로 배치 C : ftp://ftp.remotesensing.org/proj/proj-4.7.0.tar.gz

  • http://download.osgeo.org/geos/geos-3.2.2.tar.bz2
  • 내가이의 장소 : \ 온도를 \ 다음

    내가 다운로드 \ 임시 \ ECLIPSE의 \ 작업 공간 \의 SA1을 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++ 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 
    [email protected] /cygdrive/c/temp/eclipse/workspace/sa1/spatialite-android-library/jni 
    $ 
    

    누군가가 내가이 문제를 해결할 수있는 방법을 도와 드릴 : 컴파일 ++ 라인 다음은 GEOS을 통해려고 동안 다음 오류와 함께 제공하지만

    StaticLibrary : libiconv.a 
    StaticLibrary : libproj.a 
    

    을 컴파일? 어떤 도움을 주셔서 감사합니다!

답변

0

이것은 NDK의 문제인 것으로 보입니다. 이 인수는 제공된 인수 목록이 너무 길 때 발생합니다. 보통 이것은 옵션 파일을 사용하여 수정할 수 있습니다. arm-linux-androideabi-ar의 @ 매개 변수를 참조하십시오.

인터넷을 검색하면이 문제가 Google에보고 된 것으로 보입니다. 유일한 해결책은 Ubuntu VM을 사용하여 원시 코드를 컴파일하는 것입니다.

1

makefile에 다음을 추가하십시오.

LOCAL_SHORT_COMMANDS := true 
3

ndk 및 spatialite-android 폴더의 경로를 짧게하면 문제를 해결할 수 있습니다.

ndk를 c : \ cygwin 폴더로 이동하고 android-ndk-r8b에서 ndk로 이름을 변경했습니다./ NDK/-j8

NDK 빌드 \의 Cygwin에서와

그리고 CD/SLA/spatialite - 안드로이드 - 라이브러리에/JNI 폴더를 SLA 실행하는 데 이름 : 는 마찬가지로 나는 C에 안드로이드 - spatialite 폴더를 이동

그리고 컴파일됩니다.

관련 문제