I need help with this ogre dependent header (Qgears)

Posted by commodore on Stack Overflow See other posts from Stack Overflow or by commodore
Published on 2010-03-01T08:46:55Z Indexed on 2010/04/13 8:02 UTC
Read the original article Hit count: 502

Filed under:
|
|
|
|

I'm 2 errors away from compiling Qgears. (Hacked Version of the Final Fantasy VII Engine)

I've messed with the preprocessors to load the actual location of the ogre header files.

Here are the errors:

||=== qgears, Debug ===|
/home/cj/Desktop/qgears/trunk/project/linux/src/core/TextManager.h|48|error: invalid use of ‘::’|
/home/cj/Desktop/qgears/trunk/project/linux/src/core/TextManager.h|48|error: expected ‘;’ before ‘m_LanguageRoot’|
||=== Build finished: 2 errors, 0 warnings ===|

Here's the header file:

// $Id$

#ifndef TEXT_MANAGER_h
#define TEXT_MANAGER_h

#include <OGRE/OgreString.h>
#include <OGRE/OgreUTFString.h>
#include <map>

struct TextData
{
    TextData():
        text(""),
        width(0),
        height(0)
    {
    }

    Ogre::String        name;
    Ogre::UTFString     text;
    int                 width;
    int                 height;
};

typedef std::vector<TextData> TextDataVector;



class TextManager
{
public:
                          TextManager(void);
    virtual              ~TextManager(void);

    void                  SetLanguageRoot(const Ogre::String& root);

    void                  LoadTexts(const Ogre::String& file_name);
    void                  UnloadTexts(const Ogre::String& file_name);
    const TextData        GetText(const Ogre::String& name);

private:
    struct TextBlock
    {
        Ogre::String          block_name;
        std::vector<TextData> text;
    }

    Ogre::String            m_LanguageRoot;    // Line #48
    std::list<TextBlock>    m_Texts;
};



extern TextManager* g_TextManager;



#endif // TEXT_MANAGER_h

The only header file that's in include that's not a ogre header file is "map".

If it helps, I'm using the Code::Blocks IDE/GCC Compiler in GNU/Linux. (Arch)

I'm not sure even if I get this header fixed, I think I'll have build errors latter, but it's worth a shot.

Edit: I added the semicolon and I have one more error in the header file:

error: expected unqualified-id before ‘{’ token

© Stack Overflow or respective owner

Related posts about ogre

Related posts about codeblocks