Hello...
Im just having another try to build something useful using Irrlicht... But I cant get a device created. The tutorials all use the short parameter list for createDevice, but I would like to use the longer one. What am I doing wrong here, I couldnt find something on the forums....
I don't really know why it doesn't work, but in the doc, it's said "DO NOT USE OR CHANGE", so there might be a reason. Anyway, i don't understand why you want to do that, since it's the default value. I think you should just remove this parameter.
I cant use the extended version - if I try to, it says the same... Okay, then I gonna use the simple one. But how can I pass the event receiver to the device this way?
Which one's the longer or the shorter one? Yo can use the one you referenced, or createDeviceEx which is used in example 14. Your problem is probably due to linking against the wrong library, though. You have to use the one from Win32-gcc, not Win32-visual.
The long one is this: IrrlichtDevice *device = createDevice(driver, dimension, bpp, bool, bool, bool, eventreceiver, [something strange]);
Where I dont get it compiled using this one like you can see above. I'm sure there's also a shorter one... Cant find it at the moment. And no, I'm not linking against the wrong lib because, since I use linux, I've only one choice. Gonna have a look at 14, thanks for the hint.
You can leave out the "something strange" because it has a default value. Did you create the library from scratch and why don't you use a Makefile? You have to link against several other libraries as well.
If I leave out that "strange thing" ( ), it produces that undefined reference to createDevice - but which other libraries do I have to link? Isnt Irrlicht all I need? *confused*
I've written simple Irrlicht apps before, but 1.3 seems to have changed a lot...
I've written simple Irrlicht apps before, but 1.3 seems to have changed a lot...
Are you sure you are using the 1.3 library, and not the one from an older version ?
This part of the engine has not change, so i think you have linked the wrong library.
Hey, I found what was wrong. I tried to link the static library which was generated by default but I needed the shared object - made one and now it magically compiles.
ARR! Never change a running program... I wanted to put the EventReceiver in its own header and cpp files - but now g++ produces a really strange error message:
/tmp/ccYFfx16.o: In function `CEventReceiver::CEventReceiver()':
main.cpp:(.text._ZN14CEventReceiverC1Ev[CEventReceiver::CEventReceiver()]+0x12): undefined reference to `vtable for CEventReceiver'
/tmp/ccYFfx16.o: In function `CEventReceiver::~CEventReceiver()':
main.cpp:(.text._ZN14CEventReceiverD1Ev[CEventReceiver::~CEventReceiver()]+0x7): undefined reference to `vtable for CEventReceiver'
HA! Solved! Thanks to quaak from [#c++.de|Quakenet].
I only had to add the implementation file of the eventreceiver to the compiler call... Stupid, I am!