Version 8.12 patches for gcc(Mingw)

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

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. :)

kungfoomasta

20-01-2009 23:09:41

Thanks for pointing these out, I will make the changes. Not sure about the "typename" usage, but I'll add it in and see if it compiles. I've been super busy lately, I might not get to this until the weekend.

kungfoomasta

27-01-2009 08:24:13

I've applied the updates and uploaded a pre-release. If you could let me know if there are any other issues, I'll add them in. I'm planning to have the next release at the end of the month, although that might be pushing things a little.

QuickGUI_9_01.zip

darkdragon

02-02-2009 05:07:53

I've applied the updates and uploaded a pre-release. If you could let me know if there are any other issues, I'll add them in. I'm planning to have the next release at the end of the month, although that might be pushing things a little.

QuickGUI_9_01.zip

I'm sorry to be busy on last week, it's Chinese New Year.

Well, there was only one issue for mingw.
In the QuickFactory.h, Widget is not declared in using mingw. So, we should add "#include QuickWedget.h" or other ways to solve this problem.
:D

kungfoomasta

02-02-2009 05:13:31

Happy New Year! I don't remember if the fix went into the 9.01 drop I made, but the next official release won't have the problem you mentioned.