4.1 problems

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.
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

4.1 problems

Post by Cleves »

I install the 4.1 but then my app and the examples dosen't work anymore..why's that?
Cppr()x

uuh

Post by Cppr()x »

4.1 is a non-sdk, use 4.0 if ya want examples and tuts
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

Post by Cleves »

i don't want examples or tuts i just want my Application to work again..but now nothing works anymore
CppR()x

uuh

Post by CppR()x »

can you give us a little bit more information? like what OS or compiler you are running, what error it gives when you try to run the program, did you overwrite the old dir when you installed 4.1, etc
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

Post by Cleves »

I overwrite the dir and after that is start's throwing error messages about linking problem.
the compile goes well the problems happen only after i run the exe file itself
CppR()x

...

Post by CppR()x »

... what... problems.. do you get.. when you run.. the program
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

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.
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

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???
indianbeard
Posts: 20
Joined: Mon Sep 08, 2003 6:35 am
Location: India

Post by indianbeard »

Cleves wrote:I overwrite the dir and after that is start's throwing error messages about linking problem.
the compile goes well the problems happen only after i run the exe file itself
Are you using the old DLL by any chance?Is it in the path somewhere?
hearsedriver
Posts: 81
Joined: Fri Aug 22, 2003 12:06 pm
Location: Germany
Contact:

Post by hearsedriver »

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.
matthias gall, lead programmer at sechsta sinn - email matthias@sechsta-sinn.de
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

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.
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:

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.
wornaki
Posts: 54
Joined: Sat Aug 23, 2003 1:18 am
Location: Argentina, South America

Post by wornaki »

:( It seems to me that this thread should be move to advanced help and either [dx/x]HUNT3R or cleves should mail your problems to niko to quickly solve the problem. But anyway bare in mind the new documentation, maybe it solves something
Cheers
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

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... :wink:
hearsedriver
Posts: 81
Joined: Fri Aug 22, 2003 12:06 pm
Location: Germany
Contact:

Post by hearsedriver »

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
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

nope, I set everything correctly b4 trying to compile... come on I suggested that to the other guy Cleves at the top of the thread. :wink:
Post Reply