如何解决在Visual Studio 2015中从源代码构建OGRE3D时的错误
How do I resolve errors when building OGRE3D from source in Visual Studio 2015
在CMake中从源代码构建了OGRE及其唯一的强制依赖项(FreeType解决方案)后,我该如何解决以下错误。FreeType在visualstudio2015中成功编译,但当我尝试编译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:UsersUserDesktopogre_src_v1-8- 1OgreMainincludeOgreDeflate.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:UsersUserDesktopogre_src_v1-8-1OgreMainincludeOgreDeflate.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:UsersUserDesktopogre_src_v1-8-1OgreMainincludeOgreDeflate.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:UsersUserDesktopogre_src_v1-8-1OgreMainincludeOgreDeflate.h 59
Error C1083 Cannot open include file: 'zlib.h': No such file or directory OgreMain C:UsersUserDesktopogre_src_v1-8-1OgreMainsrcOgreDeflate.cpp 32
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' OgrePaging C:UsersUserDesktopOGRE2ComponentsPagingLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' Plugin_PCZSceneManager C:UsersUserDesktopOGRE2PlugInsPCZSceneManagerLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' OgreMeshUpgrader C:UsersUserDesktopOGRE2ToolsMeshUpgraderLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' OgreRTShaderSystem C:UsersUserDesktopOGRE2ComponentsRTShaderSystemLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' OgreXMLConverter C:UsersUserDesktopOGRE2ToolsXMLConverterLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' Plugin_BSPSceneManager C:UsersUserDesktopOGRE2PlugInsBSPSceneManagerLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' Plugin_OctreeSceneManager C:UsersUserDesktopOGRE2PlugInsOctreeSceneManagerLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' Plugin_ParticleFX C:UsersUserDesktopOGRE2PlugInsParticleFXLINK 1
Error LNK1181 cannot open input file '....libReleaseOgreMain.lib' RenderSystem_GL C:UsersUserDesktopOGRE2RenderSystemsGLLINK 1
Error LNK1181 cannot open input file '....libReleaseOgrePaging.lib' OgreTerrain C:UsersUserDesktopOGRE2ComponentsTerrainLINK 1
Error LNK1181 cannot open input file '....libReleasePlugin_PCZSceneManager.lib' Plugin_OctreeZone C:UsersUserDesktopOGRE2PlugInsOctreeZoneLINK 1
依赖项不仅仅是FreeType。有一个官方的专用存储库,包含所有相关内容,包括zlib:
https://bitbucket.org/cabalistic/ogredeps
克隆/下载它,并确保OgreMain可以看到它,例如,将它放入Ogre源文件夹根目录中名为"Dependencies"的文件夹中。然后,它应该被常规的CMake脚本所接受。
您的OgreMain
项目找不到文件zlib.h
。您需要确保OgreMain的include路径中包含依赖项include目录,以便它可以定位zlib.h
文件。
相关文章:
- 使用cmake从源代码构建MySQL连接器/C++失败(与以前的声明冲突)
- 更改命令行 qt5 源代码构建配置的正确/快速方法
- 从源代码构建 gRPC C++
- 为什么Qt必须从源代码构建以进行交叉编译?
- 尝试使用 MSVC 从源代码构建 qt 创建器:无法打开包含文件:"stddef.h":没有这样的文件或目录
- 从源代码构建 pcl 1.7.2
- SQLite - 从源代码构建库或将源代码直接包含在我的项目中
- 从源代码构建 openCV 之前的步骤
- 在 OSX 上从源代码构建 GIMP 2.10 在"gimp-debug-tool-2.0"失败
- 我如何只构建 TensorFlow lite,而不是从源代码构建所有 TensorFlow
- 使用 bazel 从源代码构建张量流服务遇到错误:C++规则'@org_tensorflow//…'编译失败(出口 4)
- CMake configure_file没有源代码构建
- 如何为源代码构建指定搜索目录
- 从MACOS上的源代码构建QT时错误
- 在CentOS 7上从源代码构建TileServer GL
- GRPC C++从源代码构建致命错误
- 从源代码构建Qt 5.8 - 配置:未知命令行选项'-c++11'
- 如何从可从C++代码调用的 Ada 源代码构建静态库?
- 从源代码构建编译器是否会带来更好的优化
- 从源代码构建 MySQL 连接器/C++(找不到 Boost 库错误)