NDK構建osgearth到Android平臺初體驗

osgearth for ios已然成功了, osgearth for android也是一個好想法哦,試試唄。一大堆錯誤,貼出來分享一下,希望可以有編譯出來的人給些建議。關於osgearth for ios請轉到這邊來 osgearth IOS版本編譯

cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DOSG_GL_MATRICES_AVAILABLE=OFF -DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF -DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=OFF -DOSG_GLES2_AVAILABLE=ON -DJ=4 -DANDROID_PLATFORM=8 -DANDROID_STL="gnustl_static" -DCMAKE_INSTALL_PREFIX=...android/osg_android/osges2 -DANDROID_DEBUG=ON

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
CMake Warning at /usr/share/cmake-2.8.9/Modules/Platform/CYGWIN.cmake:15 (message):
  CMake no longer defines WIN32 on Cygwin!
  (1) If you are just trying to build this project, ignore this warning or
  quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
  the CMake cache.  If later configuration or build errors occur then this
  project may have been written under the assumption that Cygwin is WIN32.
  In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.
  (2) If you are developing this project, add the line
    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
  at the top of your top-level CMakeLists.txt file or set the minimum
  required version of CMake to 2.8.4 or higher.  Then teach your project to
  build on Cygwin without WIN32.
Call Stack (most recent call first):
  /usr/share/cmake-2.8.9/Modules/CMakeSystemSpecificInformation.cmake:36 (INCLUDE)
  CMakeLists.txt:19 (PROJECT)
-- Check for working C compiler: /usr/bin/gcc.exe
-- Check for working C compiler: /usr/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Looking for XOpenDisplay in /usr/lib/libX11.dll.a;/usr/lib/libXext.dll.a
-- Looking for XOpenDisplay in /usr/lib/libX11.dll.a;/usr/lib/libXext.dll.a - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.dll.a
-- Found OpenGL: /usr/lib/libGL.dll.a
-- Found ZLIB: /usr/lib/libz.dll.a (found version "1.2.8")
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Could NOT find Qt4 (missing:  QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE) (found suitable version "4.8.1", required is "4.6")
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CURL_INCLUDE_DIR
   used as include directory in directory ...osgearth/osgearth_android/src/osgEarth
CURL_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
GDAL_INCLUDE_DIR
   used as include directory in directory ...osgearth/osgearth_android/src/osgEarth
   used as include directory in directory ...osgearth/osgearth_android/src/osgEarthAnnotation
   used as include directory in directory ...osgearth/osgearth_android/src/osgEarthFeatures
GDAL_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
    linked by target "osgEarthAnnotation" in directory ...osgearth/osgearth_android/src/osgEarthAnnotation
OPENTHREADS_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
。。。。。。。。。。。。。。。。
    linked by target "application_osgearth_overlayviewer" in directory ...osgearth/osgearth_android/src/applications/osgearth_overlayviewer
OSGDB_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
。。。。。。。。。。。。。。。。
    linked by target "application_osgearth_featuremanip" in directory ...osgearth/osgearth_android/src/applications/osgearth_featuremanip
    linked by target "application_osgearth_overlayviewer" in directory ...osgearth/osgearth_android/src/applications/osgearth_overlayviewer
OSGFX_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
    linked by target "osgEarthAnnotation" in directory ...osgearth/osgearth_android/src/osgEarthAnnotation
    linked by target "osgEarthFeatures" in directory ...osgearth/osgearth_android/src/osgEarthFeatures
    linked by target "osgEarthUtil" in directory ...osgearth/osgearth_android/src/osgEarthUtil
    linked by target "osgEarthSymbology" in directory ...osgearth/osgearth_android/src/osgEarthSymbology
OSGGA_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
    linked by target "osgEarthAnnotation" in directory ...osgearth/osgearth_android/src/osgEarthAnnotation
    linked by target "osgEarthFeatures" in directory ...osgearth/osgearth_android/src/osgEarthFeatures
    linked by target "osgEarthUtil" in directory ...osgearth/osgearth_android/src/osgEarthUtil
    linked by target "osgEarthSymbology" in directory ...osgearth/osgearth_android/src/osgEarthSymbology
OSGMANIPULATOR_LIBRARY
    linked by target "osgEarthAnnotation" in directory ...osgearth/osgearth_android/src/osgEarthAnnotation
    linked by target "osgEarthUtil" in directory ...osgearth/osgearth_android/src/osgEarthUtil
    linked by target "application_osgearth_imageoverlay" in directory ...osgearth/osgearth_android/src/applications/osgearth_imageoverlay
OSGSHADOW_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
OSGSIM_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
    linked by target "osgEarthAnnotation" in directory ...osgearth/osgearth_android/src/osgEarthAnnotation
    linked by target "osgEarthFeatures" in directory ...osgearth/osgearth_android/src/osgEarthFeatures
    linked by target "osgEarthUtil" in directory ...osgearth/osgearth_android/src/osgEarthUtil
    linked by target "osgEarthSymbology" in directory ...osgearth/osgearth_android/src/osgEarthSymbology
OSGTERRAIN_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth
。。。。。。。。。。。。。。。。
    linked by target "osgEarthUtil" in directory ...osgearth/osgearth_android/src/osgEarthUtil
    linked by target "osgEarthSymbology" in directory ...osgearth/osgearth_android/src/osgEarthSymbology
OSGTEXT_LIBRARY

    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth

。。。。。。。。。。。。。。。。
    linked by target "osgEarthSymbology" in directory ...osgearth/osgearth_android/src/osgEarthSymbology
OSGUTIL_LIBRARY

    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth

。。。。。。。。。。。。。。。。

    linked by target "application_osgearth_overlayviewer" in directory ...osgearth/osgearth_android/src/applications/osgearth_overlayviewer
OSGVIEWER_LIBRARY
    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth

。。。。。。。。。。。。。。。。
    linked by target "application_osgearth_featuremanip" in directory ...osgearth/osgearth_android/src/applications/osgearth_featuremanip
    linked by target "application_osgearth_overlayviewer" in directory ...osgearth/osgearth_android/src/applications/osgearth_overlayviewer
OSGWIDGET_LIBRARY
    linked by target "osgEarthSymbology" in directory ...osgearth/osgearth_android/src/osgEarthSymbology
    linked by target "application_osgearth_toc" in directory ...osgearth/osgearth_android/src/applications/osgearth_toc
OSG_LIBRARY

    linked by target "osgEarth" in directory ...osgearth/osgearth_android/src/osgEarth

。。。。。。。。。。。。。。。。
    linked by target "application_osgearth_featuremanip" in directory ...osgearth/osgearth_android/src/applications/osgearth_featuremanip
    linked by target "application_osgearth_overlayviewer" in directory ...osgearth/osgearth_android/src/applications/osgearth_overlayviewer

-- Configuring incomplete, errors occurred!

各種沒有找到庫的報錯,話說還要用Qt,這個庫在5.0以後纔開始往Android上移植且移植後的可靠性並不是很好,繼續努力。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章