我距离编译 Qgears 有 2 个错误。(最终幻想 VII 引擎的破解版)
我弄乱了预处理器来加载食人魔头文件的实际位置。
以下是错误:
||=== 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 ===|
这是头文件:
// $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
include 中唯一不是 Ogre 头文件的头文件是“map”。
如果有帮助,我在 GNU/Linux 中使用 Code::Blocks IDE/GCC 编译器。(拱)
我不确定即使我修复了这个标题,我想我以后也会有构建错误,但值得一试。
编辑:我添加了分号,头文件中还有一个错误:
error: expected unqualified-id before ‘{’ token