为什么只有一些 Ogre3D 依赖项是为 Release 构建的,而其余的则是为 Debug 构建的?

问题描述 投票:0回答:1

我正在建设 食人魔版本14.1.1 Github 链接https://github.com/OGRECave/ogre Windows 10 渲染器 d3d11

我在这两个依赖项上遇到了问题: 食人魔子弹、阿辛普

我已遵循官方构建教程,并关注论坛讨论以获取任何修复。 构建教程链接:https://ogrecave.github.io/ogre/api/latest/building-ogre.html

这些是我正在做的步骤:

  1. 下载存储库并解压。
  2. 我在里面创建了一个文件夹/build/debug。
  3. 然后从文件夹路径转到cmd提示符并启动一个变量。这是因为依赖项是在 CMake 的配置阶段构建的,我们必须通过命令行指定所需的
    CMAKE_BUILD_TYPE
    。更改 CMake GUI 中的值不会产生任何效果。
    set CMAKE_BUILD_TYPE=Debug
  4. 然后在cmd提示符下运行
    cmake-gui.exe -DCMAKE_BUILD-TYPE=Debug
  5. 然后CMAKE界面打开后,我点击BrowseSource设置下载的存储库文件夹。
  6. 在 BrowseBuild 中我设置了 /build/debug 文件夹
  7. 我点击配置按钮,然后使用给定的设置(用于调试构建)生成,如果没有发生错误。
  8. 然后我在 Visual Studio 2022 中打开生成的解决方案。
  9. 我为预定义目标“ALL_BUILD”构建

我已经能够构建调试一次,这样 Assimp 就可以工作了。我在 Ogre 中与 Assimp 一起工作。但现在我也尝试构建 OgreBullet,现在这两个依赖项都无法在调试中构建。

依赖项是在配置期间构建的。这是我的输出

CMake Warning (dev) at CMake/Dependencies.cmake:279 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:284 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) 
Looking for Softimage...
Could not locate Softimage
send_errorD:/Ogre_3/ogre-master/build/debug/Dependencies/bin/debug/libGLESv2.dll did not exist, can't install!
send_errorD:/Ogre_3/ogre-master/build/debug/Dependencies/bin/release/libEGL.dll did not exist, can't install!
Looking for GLSL_Optimizer...
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could not locate GLSL_Optimizer
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ freetype
+ OpenGL
+ OpenGL ES 2.x
+ DirectX11
+ pugixml
+ zlib
+ Assimp
+ Bullet
+ SDL2
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ freeimage: Support for commonly used graphics image formats <http://freeimage.sourceforge.net>
+ DirectX9: Support for the DirectX render system <http://msdn.microsoft.com/en-us/directx/>
+ cg: C for graphics shader language <http://developer.nvidia.com/object/cg_toolkit.html>
+ Vulkan SDK: Vulkan RenderSystem, glslang Plugin. Alternatively use system packages <https://vulkan.lunarg.com/>
+ OpenEXR: Load High dynamic range images <http://www.openexr.com/>
+ Python: Language bindings to use OGRE from Python <http://www.python.org/>
+ SWIG: Language bindings (Python, Java, C#) for OGRE <http://www.swig.org/>
+ Qt: optional integration with the Qt Library for window creation and input <http://www.qt.io/>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
-----------------------------------------------------------------------------


----------------------------------------------------------------------------
  FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
  + Bites
  + Bullet
  + MeshLodGenerator
  + Overlay
  + Overlay Dear Imgui
  + Paging
  + Property
  + RTShader System
  + RTShader System Shaders
  + Terrain
  + Volume
Building plugins:
  + BSP scene manager
  + Octree scene manager
  + STBI codec (generic)
  + Portal connected zone scene manager
  + Particle FX
  + DotScene loader
  + Assimp loader (.obj, .ply, .fbx and more)
Building rendersystems:
  + Direct3D 11
  + OpenGL
  + OpenGL 3+
  + OpenGL ES2/ ES3
Building executables:
  + Samples
  + Tools
Building core features:
  + Mesh Lod
  + DDS image codec (.dds)
  + ETC image codec (.pkm, .ktx) 
  + ASTC image codec (.astc)
  + ZIP archives
  + Multi-threaded WorkQueue

Build type:                      shared
Use double precision:            disabled
Assert mode:                     release exceptions

----------------------------------------------------------------------------

Configuring done (1.9s)
Generating done (0.4s)
cmake ogre ogre3d
1个回答
0
投票

Visual Studio 生成的项目将要求您从四种默认值(Release、Debug、MinSizeRel 和 RelWithDebInfo)中选择构建类型,即使项目是使用 CMake 生成的。生成 Visual Studio 项目后知道构建失败现在是它自己的问题了。您没有提到这个问题,但我假设您面临链接错误,因为在 CMake 中您可以看到:

BULLET_SOFTBODY_LIBRARY=C:/....
BULLET_SOFTBODY_LBRARY_DEBUG=BULLET_SOFTBODY_LBRARY_DEBUG-NOTFOUND

建议您没有该项目符号库的调试库。因此,如果您尝试构建它,它将没有可链接的调试库。如果该库确实存在,请确保将 CMake 变量设置为该库的位置。但如果这不是您的问题,那么发布您的错误消息将会很有用。

© www.soinside.com 2019 - 2024. All rights reserved.