4.1 problems
4.1 problems
I install the 4.1 but then my app and the examples dosen't work anymore..why's that?
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
I just installed the new 0.4.1 also and got some messed up error messages too. My problem was that Niko got rid of the InputReceiver in the createDevice. I just had to delete that from my createDevice call and the program ran but now none of my input works. So I've got to figure out what to do with that. But if this isn't your problem too then be sure that you set your compiler to link to the correct lib and include dirs for 0.4.1 and that you copied the new irrlicht.dll into your program dir.
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
Anyone know whats up with the input change??? I used to have the IEventReceiver class overridden like this:
class InputReceiver : public IEventReceiver{
...
..
.
}
and I then declare a
InputRecevier inputReceiver;
to use in the game and then do the new
device->setEventReceiver(inputReceiver);
but I get a compile error everytime. Says it cannot convert from inputReceiver to IEventReceiver*. So I made it a InputReceiver* and it gives me linker errors. How did everyone else convert their input class for the new 0.4.1???
class InputReceiver : public IEventReceiver{
...
..
.
}
and I then declare a
InputRecevier inputReceiver;
to use in the game and then do the new
device->setEventReceiver(inputReceiver);
but I get a compile error everytime. Says it cannot convert from inputReceiver to IEventReceiver*. So I made it a InputReceiver* and it gives me linker errors. How did everyone else convert their input class for the new 0.4.1???
-
- Posts: 20
- Joined: Mon Sep 08, 2003 6:35 am
- Location: India
-
- Posts: 81
- Joined: Fri Aug 22, 2003 12:06 pm
- Location: Germany
- Contact:
The setEventReceiver method of the device requires a pointer to an IEventReceiver implementation. If you create an automatic instance of the device as you stated, you need to use the address-operator: device->setEventReceiver( &inputReceiver );
Another way would be to create a dynamic instance via new: InputReceiver* pReceiver = new InputReceiver; device->setInputReceiver( pReceiver );
Cheers.
Another way would be to create a dynamic instance via new: InputReceiver* pReceiver = new InputReceiver; device->setInputReceiver( pReceiver );
Cheers.
matthias gall, lead programmer at sechsta sinn - email matthias@sechsta-sinn.de
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
Nope, none of your suggestions work. I almost slapped myself for not using the address of operator but it didn't change the fact that it still won't compile. So now I'm using the address of operator:Matthias Gall wrote:The setEventReceiver method of the device requires a pointer to an IEventReceiver implementation. If you create an automatic instance of the device as you stated, you need to use the address-operator: device->setEventReceiver( &inputReceiver );
Another way would be to create a dynamic instance via new: InputReceiver* pReceiver = new InputReceiver; device->setInputReceiver( pReceiver );
Cheers.
device->setEventReceiver(&inputReceiver);
and now I get the linker error message:
Linking...
main.obj : error LNK2001: unresolved external symbol "public: void __thiscall irr::IrrlichtDevice::setEventReceiver(class irr::IEventReceiver *)" (?setEventReceiver@IrrlichtDevice@irr@@QAEXPAVIEventReceiver@2@@Z)
Debug/SupaG.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
All right, I dont understand it but I can compile just fine now. I got rid of the new call:
device->setEventReceiver(&inputReceiver);
And just changed it back the way it was for version 0.4 by putting the inputReceiver back into the createDevice call. And now it works fine! Didn't work before, but it sure works fine now and without any modification from the way it was setup in version 0.4. It's really strange because I swear when I first installed 0.4.1 and compiled I got a crazy error and all I did was change the code around some and then put it back the way it was to start with and after leaving it sitting there for a few hours it works now. I guess I'm just too damn good...
device->setEventReceiver(&inputReceiver);
And just changed it back the way it was for version 0.4 by putting the inputReceiver back into the createDevice call. And now it works fine! Didn't work before, but it sure works fine now and without any modification from the way it was setup in version 0.4. It's really strange because I swear when I first installed 0.4.1 and compiled I got a crazy error and all I did was change the code around some and then put it back the way it was to start with and after leaving it sitting there for a few hours it works now. I guess I'm just too damn good...
-
- Posts: 81
- Joined: Fri Aug 22, 2003 12:06 pm
- Location: Germany
- Contact:
setEventReceiver is a new method in 0.4.1 - maybe you used the headers of 0.4.1, but linked against the lib of 0.4?
matthias gall, lead programmer at sechsta sinn - email matthias@sechsta-sinn.de
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida