I want to create my own font class just like this:
class ColorFont:public CEGUI::FreeTypeFont
{
public:
ColorFont(const CEGUI::String& name, const CEGUI::String& fontname,
const CEGUI::String& resourceGroup = "");
void drawTextLine (const CEGUI::String& text, const CEGUI::Vector3& position,
const CEGUI::Rect& clip_rect, const CEGUI::ColourRect& colours, float x_scale = 1.0f, float y_scale = 1.0f);
}
and overwrite the drawTextLine function, so I can change the font colour by the text.
However, when i compile it, these are something wrong , and I don't know how to solve,please help!!! I want a multicolour text.
error LNK2001: 无法解析的外部符号 "protected: __thiscall CEGUI::FreeTypeFont::FreeTypeFont(class CEGUI::String const &,class CEGUI::String const &,class CEGUI::String const &)" (??0FreeTypeFont@CEGUI@@IAE@ABVString@1@00@Z)
1>ColorFont.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall CEGUI::FreeTypeFont::updateFont(void)" (?updateFont@FreeTypeFont@CEGUI@@MAEXXZ)
1>ColorFont.obj : error LNK2001: 无法解析的外部符号 "public: virtual void __thiscall CEGUI::FreeTypeFont::rasterize(unsigned int,unsigned int)" (?rasterize@FreeTypeFont@CEGUI@@UAEXII@Z)
1>ColorFont.obj : error LNK2001: 无法解析的外部符号 "protected: virtual void __thiscall CEGUI::FreeTypeFont::writeXMLToStream_impl(class CEGUI::XMLSerializer &)const " (?writeXMLToStream_impl@FreeTypeFont@CEGUI@@MBEXAAVXMLSerializer@2@@Z)
1>ColorFont.obj : error LNK2001: 无法解析的外部符号 "public: virtual void __thiscall CEGUI::FreeTypeFont::load(void)" (?load@FreeTypeFont@CEGUI@@UAEXXZ)
1>ColorFont.obj : error LNK2001: 无法解析的外部符号 "protected: virtual __thiscall CEGUI::FreeTypeFont::~FreeTypeFont(void)" (??1FreeTypeFont@CEGUI@@MAE@XZ)
Help!! How can I create my own font class?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Help!! How can I create my own font class?
It looks like you're not linking against the CEGUIBase lib.
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Help!! How can I create my own font class?
CrazyEddie wrote:It looks like you're not linking against the CEGUIBase lib.
CE.
but i have linked to it. if i don't use this class, the cegui performs very well in my game.I don't know what happened
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Help!! How can I create my own font class?
Yeah, I just looked at the code for CEGUI::FreeTypeFont - it turns out we're not exporting the symbols from the DLL (because further subclassing is not actually the intended usage of those classes).
As a slight aside, the latest trunk code for CEGUI has some support for coloured text (along with lots of other things) - it's not interface compatible with the old version though and the code is still being debugged and tuned.
CE.
As a slight aside, the latest trunk code for CEGUI has some support for coloured text (along with lots of other things) - it's not interface compatible with the old version though and the code is still being debugged and tuned.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 4 guests