Closed FuzzyWuggzy closed 1 year ago
For a test try to comment out whole Singleton
class (lines 15 to 62). It is deprecated and not used in MyGUI code. It was left there for backward compatibility with users code if they used this class externally.
But I'm surprised that your compiler doesn't support [[deprecated]]
classes
For a test try to comment out whole
Singleton
class (lines 15 to 62). It is deprecated and not used in MyGUI code. It was left there for backward compatibility with users code if they used this class externally.
Okay, so commenting out the class and using the MYGUI_DONT_USE_OBSOLETE
flag got it further, but it still didn't complete successfully:
[ 30%] Building CXX object Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreVertexBuffer.cpp.o
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In destructor ‘virtual MyGUI::OgreDataStream::~OgreDataStream()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:19:25: error: ‘Ogre::DataStreamPtr’ {aka ‘class Ogre::SharedPtr<Ogre::DataStream>’} has no member named ‘reset’
19 | mStream.reset();
| ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual bool MyGUI::OgreDataStream::eof()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:24:24: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
24 | return !mStream ? true : mStream->eof();
| ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:24:24: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:24:24: note: no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual size_t MyGUI::OgreDataStream::size()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:29:24: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
29 | return !mStream ? 0 : mStream->size();
| ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:29:24: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:29:24: note: no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual void MyGUI::OgreDataStream::readline(std::string&, MyGUI::Char)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:34:21: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
34 | if (!mStream)
| ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:34:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:34:21: note: no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual size_t MyGUI::OgreDataStream::read(void*, size_t)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:44:21: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
44 | if (!mStream) return 0;
| ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:44:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:44:21: note: no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:90: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreDataStream.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 30%] Linking CXX shared library ../../bin/Plugin_StrangeButton.so
[ 30%] Built target Plugin_StrangeButton
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp: In member function ‘void MyGUI::OgreVertexBuffer::destroy()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:52:31: error: ‘class Ogre::HardwareVertexBufferSharedPtr’ has no member named ‘reset’
52 | mVertexBuffer.reset();
| ^~~~~
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:146: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreVertexBuffer.cpp.o] Error 1
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp: In member function ‘const MyGUI::VectorString& MyGUI::OgreDataManager::getDataListNames(const std::string&, bool) const’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp:102:43: error: ‘Ogre::FileInfoListPtr’ {aka ‘class Ogre::SharedPtr<std::vector<Ogre::FileInfo, Ogre::STLAllocator<Ogre::FileInfo, Ogre::CategorisedAllocPolicy<Ogre::MEMCATEGORY_GENERAL> > > >’} has no member named ‘reset’
102 | pFileInfo.reset();
| ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp:129:35: error: ‘class Ogre::SharedPtr<std::vector<Ogre::FileInfo, Ogre::STLAllocator<Ogre::FileInfo, Ogre::CategorisedAllocPolicy<Ogre::MEMCATEGORY_GENERAL> > > >’ has no member named ‘reset’
129 | pFileInfo.reset();
| ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp: In member function ‘virtual void MyGUI::OgreTexture::destroy()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:65:21: error: could not convert ‘((MyGUI::OgreTexture*)this)->MyGUI::OgreTexture::mTexture’ from ‘Ogre::TexturePtr’ {aka ‘Ogre::SharedPtr<Ogre::Texture>’} to ‘bool’
65 | if (mTexture)
| ^~~~~~~~
| |
| Ogre::TexturePtr {aka Ogre::SharedPtr<Ogre::Texture>}
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:68:34: error: ‘Ogre::TexturePtr’ {aka ‘class Ogre::SharedPtr<Ogre::Texture>’} has no member named ‘reset’
68 | mTexture.reset();
| ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp: In member function ‘virtual void MyGUI::OgreTexture::loadFromFile(const std::string&)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:232:75: error: no matching function for call to ‘static_pointer_cast<Ogre::Texture>(Ogre::SharedPtr<Ogre::Resource>&)’
232 | mTexture = std::static_pointer_cast<Ogre::Texture>(createResult.first);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/bits/shared_ptr.h:53,
from /usr/include/c++/12/memory:76,
from /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:35,
from /usr/include/boost/smart_ptr/detail/shared_count.hpp:27,
from /usr/include/boost/smart_ptr/shared_ptr.hpp:17,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/include/boost/date_time/time_clock.hpp:17,
from /usr/include/boost/thread/thread_time.hpp:9,
from /usr/include/boost/thread/lock_types.hpp:18,
from /usr/include/boost/thread/pthread/recursive_mutex.hpp:13,
from /usr/include/boost/thread/recursive_mutex.hpp:16,
from /usr/include/OGRE/Threading/OgreThreadHeadersBoost.h:47,
from /usr/include/OGRE/Threading/OgreThreadHeaders.h:34,
from /usr/include/OGRE/OgreStringInterface.h:35,
from /usr/include/OGRE/OgreResource.h:34,
from /home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/include/MyGUI_OgreTexture.h:14,
from /home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:8:
/usr/include/c++/12/bits/shared_ptr_base.h:1929:5: note: candidate: ‘template<class _Tp, class _Tp1, __gnu_cxx::_Lock_policy _Lp> std::__shared_ptr<_Tp1, _Lp> std::static_pointer_cast(const __shared_ptr<_Tp2, _Lp>&)’
1929 | static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/shared_ptr_base.h:1929:5: note: template argument deduction/substitution failed:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:232:75: note: ‘Ogre::SharedPtr<Ogre::Resource>’ is not derived from ‘const std::__shared_ptr<_Tp2, _Lp>’
232 | mTexture = std::static_pointer_cast<Ogre::Texture>(createResult.first);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/shared_ptr.h:700:5: note: candidate: ‘template<class _Tp, class _Up> std::shared_ptr<_Tp> std::static_pointer_cast(const shared_ptr<_Tp>&)’
700 | static_pointer_cast(const shared_ptr<_Up>& __r) noexcept
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/shared_ptr.h:700:5: note: template argument deduction/substitution failed:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:232:75: note: ‘Ogre::SharedPtr<Ogre::Resource>’ is not derived from ‘const std::shared_ptr<_Tp>’
232 | mTexture = std::static_pointer_cast<Ogre::Texture>(createResult.first);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp: In member function ‘void MyGUI::OgreTexture::setFormatByOgreTexture()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:246:21: error: could not convert ‘((MyGUI::OgreTexture*)this)->MyGUI::OgreTexture::mTexture’ from ‘Ogre::TexturePtr’ {aka ‘Ogre::SharedPtr<Ogre::Texture>’} to ‘bool’
246 | if (mTexture)
| ^~~~~~~~
| |
| Ogre::TexturePtr {aka Ogre::SharedPtr<Ogre::Texture>}
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:76: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreDataManager.cpp.o] Error 1
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘void MyGUI::OgreRenderManager::initialise(Ogre::RenderWindow*, Ogre::SceneManager*)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:56:52: error: ‘TAM_CLAMP’ is not a member of ‘Ogre’
56 | tu->setTextureAddressingMode(Ogre::TAM_CLAMP);
| ^~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘virtual MyGUI::ITexture* MyGUI::OgreRenderManager::getTexture(const std::string&)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:348:29: error: could not convert ‘texture’ from ‘Ogre::TexturePtr’ {aka ‘Ogre::SharedPtr<Ogre::Texture>’} to ‘bool’
348 | if (texture)
| ^~~~~~~
| |
| Ogre::TexturePtr {aka Ogre::SharedPtr<Ogre::Texture>}
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘MyGUI::OgreShaderInfo* MyGUI::OgreRenderManager::createShader(const std::string&, const std::string&, const std::string&)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:514:21: error: no match for ‘operator!’ (operand type is ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’})
514 | if (!shaderInfo->vertexProgram)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:514:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:514:21: note: no known conversion for argument 1 from ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:535:21: error: no match for ‘operator!’ (operand type is ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’})
535 | if (!shaderInfo->fragmentProgram)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:535:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:535:21: note: no known conversion for argument 1 from ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘void MyGUI::OgreRenderManager::setShaderProjectionMatrix(bool)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:570:84: error: ‘Ogre::Affine3’ has not been declared
570 | params->setNamedConstant("worldViewProj", projectionMatrix * Ogre::Affine3::IDENTITY);
| ^~~~~~~
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:132: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreTexture.cpp.o] Error 1
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:118: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreRenderManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:598: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
But I'm surprised that your compiler doesn't support
[[deprecated]]
classes
I've never understood why this is the case, I've found that many projects fail to compile under my Fedora setup when they do under other Linux distros like Arch and Debian, I'm using the stock GCC compiler from the official Fedora repo.
Thank you for responding
By commenting out all instances of template <>
in MyGUI_EventPair.h managed to get building to the point above without needing the MYGUI_DONT_USE_OBSOLETE
flag, but but no progress beyond that.
I also tried commenting out line 191 of CMakeLists.txt (add_compile_options(-Werror)
) thinking that it'd stop GCC treating warnings as errors, that didn't work either.
I reproduced most issues you've encountered in Ubuntu with GCC 9, so I'll try to spend some time figuring out what's wrong
@FuzzyWuggzy I fixed all issues with my GCC-9 buid. Please check that master
builds for you now
Hi, I am unable to build the latest master commit under Fedora 37.
Here's the output of CMake with default flags:
And Make: