darkdragon
20-01-2009 05:46:33
The patched files are here.
And the modified codes are as follows:
First, the template problem in QuickGUIFactory.h and QuickGUIWidgetFactory.h.
For example in QuickGUIFactory.h
The 'BaseClassType' at this must be different from it at the top.
'template<typename BaseClassType> class _QuickGUIExport Factory...'
So, I modified them to this
I have no idea how to name, so please give it a new name.
And another problem is the declaration of iterator.
For example, 'std::map< Ogre::String, createObjectFunc >::iterator iter...' is wrong in Mingw.
We have to add the typename for it, like this 'typename std::map< Ogre::String, createObjectFunc >::iterator iter...'.
Second, "int getCursorIndexAtPosition(Point& p);" in the QuickGUIText.h and .cpp would be modified to
"int getCursorIndexAtPosition(const Point& p);".
At last, in the QuickGUITimer.h, we would add #include "OgrePrerequisites.h" for Ogre::MEMCATEGORY_GENERAL.
Well, it could works using mingw now.
And the modified codes are as follows:
First, the template problem in QuickGUIFactory.h and QuickGUIWidgetFactory.h.
For example in QuickGUIFactory.h
template<typename BaseClassType, typename ClassType>
static BaseClassType* createObject(const Ogre::String& param1)
{
return OGRE_NEW_T(ClassType,Ogre::MEMCATEGORY_GENERAL)(param1);
}
The 'BaseClassType' at this must be different from it at the top.
'template<typename BaseClassType> class _QuickGUIExport Factory...'
So, I modified them to this
template<typename BaseClassType1, typename ClassType>
static BaseClassType1* createObject(const Ogre::String& param1)
{
return OGRE_NEW_T(ClassType,Ogre::MEMCATEGORY_GENERAL)(param1);
}
I have no idea how to name, so please give it a new name.
And another problem is the declaration of iterator.
For example, 'std::map< Ogre::String, createObjectFunc >::iterator iter...' is wrong in Mingw.
We have to add the typename for it, like this 'typename std::map< Ogre::String, createObjectFunc >::iterator iter...'.
Second, "int getCursorIndexAtPosition(Point& p);" in the QuickGUIText.h and .cpp would be modified to
"int getCursorIndexAtPosition(const Point& p);".
At last, in the QuickGUITimer.h, we would add #include "OgrePrerequisites.h" for Ogre::MEMCATEGORY_GENERAL.
Well, it could works using mingw now.