Reputation: 23
How am I to resolve the following errors, having built both OGRE and its only mandatory dependency (FreeType solutions) in CMake from source. FreeType compiles successfully in visual studio 2015, but when I try to compile OGRE it spits out the following errors. Any help you can offer will be greatly appreciated.
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
Upvotes: 2
Views: 728
Reputation: 3669
There are more dependencies than only FreeType. There is an official, dedicated repository that contains everything relevant, including zlib:
https://bitbucket.org/cabalistic/ogredeps
Clone / download that and make sure that OgreMain can see it, e.g. by putting it into a folder named "Dependencies" inside the root of your Ogre source folder. Then it should get picked up by the regular CMake scripts.
Upvotes: 3
Reputation: 21113
Your OgreMain
project isn't finding the file zlib.h
. You need to make sure that you have the dependencies include directory included in OgreMain's include path so that it can locate the zlib.h
file.
Upvotes: 0