gpt4 book ai didi

c++ - 如何构建 Openscenegraph earth 2.6

转载 作者:太空宇宙 更新时间:2023-11-04 11:25:29 25 4
gpt4 key购买 nike

抱歉我的英语不好..

我正在尝试让 osgEarth 与 c++ 和 visual studio 2013 一起工作。

我首先从该页面下载了 Open Scene Graph 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 配合良好的相同预构建依赖包。

提前致谢!

最佳答案

好吧,如果您不想使用 Qt 进行构建,则可以忽略 Qt 位。

我认为 osgEarth 非常需要 ZLIB,或者至少,我一直使用它来构建。

确保您在 CMake 中找到的 ZLIB 条目是正确的:

我的样子ZLIB_INCLUDE_DIR C:/blah/blah/windows-VS10.0.30319-x86-release/includeZLIB_LIBRARY C:/blah/blah/windows-VS10.0.30319-x86-release/lib/zlib.lib

看看这是否解决了一些问题。我不熟悉安装目标错误,但谷歌搜索建议: CMake Error: TARGETS given no LIBRARY DESTINATION for shared library target

它可能是一个损坏的 CMake 文件。确保您使用的是 osgEarth 2.6 的 HEAD 版本,以防在 2.6 标记版本之后出现错误修复。

关于c++ - 如何构建 Openscenegraph earth 2.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26815392/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com