unresolved external

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ILDG

unresolved external

Post by ILDG »

Hello!
When compiling device->setEventReceiver(&receiver);
I get the following error;
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall irr::IrrlichtDevice::setEventReceiver(class irr::IEventReceiver *)" (?setEventReceiver@IrrlichtDevice@irr@@QAEXPAVIEventReceiver@2@@Z)
I'm sure I'm using the new 0.4.1 lib's and include's, so I really can't figure out this problem...
Any help appreciated...
Thanks in advance!
//ILDG
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Hi, sorry, this is an error in the header files. There is a 'virtual' missing before the method setEventReceiver() and a "=0" after it in IrrDevice.h.
ILDG

thanks!

Post by ILDG »

the title says it all! :D
ILDG

not wverytinh works as it should...

Post by ILDG »

ok... maybe I was too quick to post my last, reply... you see, there's still an error... but now it's a runtime error. When starting my "game", windows says it has executed an illegal operation and quits it..
Why? Here's my code: ( I know it's somewhere here the error is cause when I comment out theses lines it works)

class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (camera)
{
return camera->OnEvent(event);
}

return false;
}
};


int main()
{

MyEventReceiver receiver;

device->setEventReceiver(&receiver);

and device is declared as this:
IrrlichtDevice *device = createDevice(video::DT_DIRECTX8, core::dimension2d<s32>(640, 480), 16, false, false, NULL);

So, Why is this problem?
Thanks in advance!
//ILDG
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Maybe you'll have to recompile the engine if you made this change to the header files.
ILDG

ok...

Post by ILDG »

damn it... I can't recompile the engine... It just don't work, I get around 480 error messages, So I'll just wait until an new release when everything is fixed!
Post Reply