gpt4 book ai didi

c++ - 在 Visual Studio 2015 中从源代码构建 OGRE3D 时如何解决错误

转载 作者:搜寻专家 更新时间:2023-10-31 01:37:10 26 4
gpt4 key购买 nike

我如何解决以下错误,从源代码在 CMake 中构建了 OGRE 及其唯一的强制依赖项(FreeType 解决方案)。 FreeType 在 vi​​sual studio 2015 中编译成功,但当我尝试编译 OGRE 时,它吐出以下错误。您能提供的任何帮助将不胜感激。

Severity    Code    Description Project File    Line
Warning C4251 'Ogre::DeflateStream::mCompressedStream': class 'Ogre::SharedPtr<Ogre::DataStream>' needs to have dll-interface to be used by clients of class 'Ogre::DeflateStream' OgreMain C:\Users\User\Desktop\ogre_src_v1-8- 1\OgreMain\include\OgreDeflate.h 58
Warning C4251 'Ogre::DeflateStream::mReadCache': class 'Ogre::StaticCache<2048>' needs to have dll-interface to be used by clients of class 'Ogre::DeflateStream' OgreMain C:\Users\User\Desktop\ogre_src_v1-8-1\OgreMain\include\OgreDeflate.h 65
Warning C4251 'Ogre::DeflateStream::mTempFileName': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'Ogre::DeflateStream' OgreMain C:\Users\User\Desktop\ogre_src_v1-8-1\OgreMain\include\OgreDeflate.h 60
Warning C4251 'Ogre::DeflateStream::mTmpWriteStream': class 'Ogre::SharedPtr<Ogre::DataStream>' needs to have dll-interface to be used by clients of class 'Ogre::DeflateStream' OgreMain C:\Users\User\Desktop\ogre_src_v1-8-1\OgreMain\include\OgreDeflate.h 59
Error C1083 Cannot open include file: 'zlib.h': No such file or directory OgreMain C:\Users\User\Desktop\ogre_src_v1-8-1\OgreMain\src\OgreDeflate.cpp 32
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' OgrePaging C:\Users\User\Desktop\OGRE2\Components\Paging\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' Plugin_PCZSceneManager C:\Users\User\Desktop\OGRE2\PlugIns\PCZSceneManager\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' OgreMeshUpgrader C:\Users\User\Desktop\OGRE2\Tools\MeshUpgrader\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' OgreRTShaderSystem C:\Users\User\Desktop\OGRE2\Components\RTShaderSystem\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' OgreXMLConverter C:\Users\User\Desktop\OGRE2\Tools\XMLConverter\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' Plugin_BSPSceneManager C:\Users\User\Desktop\OGRE2\PlugIns\BSPSceneManager\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' Plugin_OctreeSceneManager C:\Users\User\Desktop\OGRE2\PlugIns\OctreeSceneManager\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' Plugin_ParticleFX C:\Users\User\Desktop\OGRE2\PlugIns\ParticleFX\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgreMain.lib' RenderSystem_GL C:\Users\User\Desktop\OGRE2\RenderSystems\GL\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\OgrePaging.lib' OgreTerrain C:\Users\User\Desktop\OGRE2\Components\Terrain\LINK 1
Error LNK1181 cannot open input file '..\..\lib\Release\Plugin_PCZSceneManager.lib' Plugin_OctreeZone C:\Users\User\Desktop\OGRE2\PlugIns\OctreeZone\LINK 1

最佳答案

有比 FreeType 更多的依赖项。有一个官方的专用存储库,其中包含所有相关内容,包括 zlib:

https://bitbucket.org/cabalistic/ogredeps

克隆/下载并确保 OgreMain 可以看到它,例如将它放入 Ogre 源文件夹根目录下名为“Dependencies”的文件夹中。然后它应该被常规的 CMake 脚本获取。

关于c++ - 在 Visual Studio 2015 中从源代码构建 OGRE3D 时如何解决错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34563438/

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