2014-11-08 17 views
1

對不起我的英文不好..如何建立OpenSceneGraph的地球2.6

我試圖讓osgEarth使用C++和Visual Studio 2013年的工作

我先下載開放場景圖3.2和預生成依賴(小包裝)從這個頁面。我生成了Visual Studio 2013項目,並且構建/安裝了Open Scene Graph,沒有太大問題。

在那之後,我下載osgearth 2.6的來源,當我嘗試創建Visual Studio解決方案,我有一些類型的錯誤:

Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 
CMake Warning at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindQt4.cmake:616 (message): 
    c:/lib/Qt/5.3.2/5.3/msvc2013_opengl/bin/qmake.exe reported QT_INSTALL_LIBS 
    as "C:/lib/Qt/5.3.2/5.3/msvc2013_opengl/lib" but QtCore could not be found 
    there. Qt is NOT installed correctly for the target build environment. 
Call Stack (most recent call first): 
    CMakeLists.txt:147 (FIND_PACKAGE) 


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgEarth". 
Call Stack (most recent call first): 
    src/osgEarth/CMakeLists.txt:304 (INCLUDE) 


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgEarthAnnotation". 
Call Stack (most recent call first): 
    src/osgEarthAnnotation/CMakeLists.txt:89 (INCLUDE) 


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgEarthFeatures". 
Call Stack (most recent call first): 
    src/osgEarthFeatures/CMakeLists.txt:117 (INCLUDE) 


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgEarthUtil". 
Call Stack (most recent call first): 
    src/osgEarthUtil/CMakeLists.txt:185 (INCLUDE) 


CMake Error at CMakeModules/ModuleInstall.cmake:57 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgEarthSymbology". 
Call Stack (most recent call first): 
    src/osgEarthSymbology/CMakeLists.txt:122 (INCLUDE) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_earth". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/earth/CMakeLists.txt:28 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_kml". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/kml/CMakeLists.txt:92 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_wcs". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/wcs/CMakeLists.txt:26 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_wms". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/wms/CMakeLists.txt:13 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_tilecache". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/tilecache/CMakeLists.txt:9 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_tileservice". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/tileservice/CMakeLists.txt:8 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_yahoo". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/yahoo/CMakeLists.txt:3 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_arcgis_map_cache". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/arcgis_map_cache/CMakeLists.txt:2 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_arcgis". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/arcgis/CMakeLists.txt:14 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_tms". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/tms/CMakeLists.txt:12 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_vpb". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/vpb/CMakeLists.txt:9 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_osg". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/osg/CMakeLists.txt:7 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_agglite". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/agglite/CMakeLists.txt:11 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_model_simple". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/model_simple/CMakeLists.txt:4 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_debug". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/debug/CMakeLists.txt:4 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_cache_filesystem". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/cache_filesystem/CMakeLists.txt:12 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_refresh". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/refresh/CMakeLists.txt:8 (SETUP_PLUGIN) 


CMake Error at CMakeModules/OsgEarthMacroUtils.cmake:231 (INSTALL): 
    install TARGETS given no ARCHIVE DESTINATION for static library target 
    "osgdb_osgearth_xyz". 
Call Stack (most recent call first): 
    src/osgEarthDrivers/xyz/CMakeLists.txt:10 (SETUP_PLUGIN) 
... 
ZLIB_LIBRARY (ADVANCED) 
    linked by target "osgEarth" in directory C:/Users/***/Desktop/OSG/osgearth-osgearth-2.6/src/osgEarth 

Configuring incomplete, errors occurred! 
See also "C:/Users/Dario/Desktop/OSG/TempBuild/CMakeFiles/CMakeOutput.log". 
See also "C:/Users/Dario/Desktop/OSG/TempBuild/CMakeFiles/CMakeError.log". 

我已經使用了相同的預生成依賴包與OSG工作正常..

在此先感謝!

回答

1

那麼,如果你不想用Qt構建,你可以忽略Qt位。

我認爲osgEarth幾乎需要ZLIB,或者至少,我一直用它來構建。

請確保您的CMake ZLIB條目確定發現:

礦看起來像 ZLIB_INCLUDE_DIR C:/blah/blah/windows-VS10.0.30319-x86-release/include ZLIB_LIBRARY C:/等等/等等/windows-VS10.0.30319-x86-release/lib/zlib.lib

看看是否解決了一些問題。我不熟悉安裝目標錯誤,但Google搜索暗示: CMake Error: TARGETS given no LIBRARY DESTINATION for shared library target

它可能是一個被破壞的CMake文件。確保您使用的是osgEarth 2.6的HEAD版本,以防2.6版標籤發佈後有錯誤修復。