您的位置:首页 > 移动开发 > Android开发

NDK构建osgearth到Android平台初体验

2013-12-30 10:18 513 查看
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上移植且移植后的可靠性并不是很好,继续努力。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: