Originariamente inviato da MacApp
Più errori in fase di compilazione = meno errori runtime
;-)
mi sa che hai proprio ragione ; )


Comunque, ho risolto il problema sopra: bastava mettere "typename" davanti a CEGUISingletonX. Evviva.

Ovviamente mi da altri errori adesso
Pare infatti che usare la ext/hash_map abbia confuso il compilatore visto che viene usata anche nel motore grafico. g++ mi dice:

codice:
/usr/local/include/OGRE/OgreString.h:40: error: specialization of ‘__gnu_cxx::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >’ after instantiation
/usr/local/include/OGRE/OgreString.h:40: error: redefinition of ‘struct __gnu_cxx::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >’
/usr/include/c++/4.1.3/ext/hash_fun.h:71: error: previous definition of ‘struct __gnu_cxx::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >’
quindi non capisce più che funzione di hash usare mi sembra... è un errore assurdo perchè OGRE è stato compilato correttamente. Ad ogni modo quel benedetto OgreString.h contiene questo:
codice:
#include <ext/hash_map>
namespace __gnu_cxx
{
    template <> struct hash< Ogre::_StringBase >
    {
        size_t operator()( const Ogre::_StringBase _stringBase ) const
        {
            /* This is the PRO-STL way, but it seems to cause problems with VC7.1
               and in some other cases (although I can't recreate it)
            hash<const char*> H;
            return H(_stringBase.c_str());
            */
            /** This is our custom way */
            register size_t ret = 0;
            for( Ogre::_StringBase::const_iterator it = _stringBase.begin(); it != _stringBase.end(); ++it )
                ret = 5 * ret + *it;

            return ret;
        }
    };
}

#endif

namespace Ogre {

    /** Utility class for manipulating Strings.  */
    class _OgreExport StringUtil
    {
... .
...
ETC ETC
Sono a un passo da aver finito il porting accidenti !