almondega
23-04-2012 01:45:09
Hi everyone, I'm trying to set my first delegate in a MultiListBox, but I'm getting the following linker error:
Since the MyGUI wiki is outdated for delegate events, I searched for samples here on the forum, and did this on my project:
Header.h
Header.cpp
Am I missing some code or project configuration?
Thanks.
BattleManager.obj : error LNK2001: unresolved external symbol "private: void __thiscall BattleManager::onMultiListKeyButtonPress(class MyGUI::Widget *,struct MyGUI::KeyCode,unsigned int)" (?onMultiListKeyButtonPress@BattleManager@@AAEXPAVWidget@MyGUI@@UKeyCode@3@I@Z)
Since the MyGUI wiki is outdated for delegate events, I searched for samples here on the forum, and did this on my project:
Header.h
class BattleManager
{
public:
BattleManager(...);
private:
void onMultiListKeyButtonPress(MyGUI::Widget* sender, MyGUI::KeyCode key, MyGUI::Char _char);
};
Header.cpp
BattleManager::BattleManager(...)
{
uiSpecialMagic->eventKeyButtonPressed += MyGUI::newDelegate(this, &BattleManager::onMultiListKeyButtonPress); // Causes linker error
}
void onMultiListKeyButtonPress(MyGUI::Widget* sender, MyGUI::KeyCode key, MyGUI::Char _char)
{
...
}
Am I missing some code or project configuration?
Thanks.