I'm trying to compile scummvm 1.6.0 with the mipspro compilers. Right now, I'm stuck with their singleton hack. The error I'm getting is
Although the constuct is supposed to prevent this exact error:
Code:
cc-3234 CC: ERROR File = graphics/fonts/ttf.cpp, Line = 479
Explicit specialization of member
"Common::Singleton<Graphics::TTFLibrary>::_singleton" must precede
its first use.
template<> Graphics::TTFLibrary *Singleton<Graphics::TTFLibrary>::_singleton = 0;
Explicit specialization of member
"Common::Singleton<Graphics::TTFLibrary>::_singleton" must precede
its first use.
template<> Graphics::TTFLibrary *Singleton<Graphics::TTFLibrary>::_singleton = 0;
Although the constuct is supposed to prevent this exact error:
Code:
/**
* Note that you need to use this macro from the Common namespace.
*
* This is because C++ requires initial explicit specialization
* to be placed in the same namespace as the template.
*/
#define DECLARE_SINGLETON(T) \
template<> T *Singleton<T>::_singleton = 0
} // End of namespace Common
Does anyone have an Idea how to work around this for MIPSPro C++?
* Note that you need to use this macro from the Common namespace.
*
* This is because C++ requires initial explicit specialization
* to be placed in the same namespace as the template.
*/
#define DECLARE_SINGLETON(T) \
template<> T *Singleton<T>::_singleton = 0
} // End of namespace Common