And Code::Blocks shows the first line of the OnEvent method implementation, as if the error was here somewhere... is it so?
Error reported by IDE:
Infos:||=== Build: Debug in CamelCAM (compiler: GNU GCC Compiler) ===|
obj\Debug\EventHandlers.o:D:\src\CamelCAM\EventHandlers.cpp|25|first defined here|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
I'm on win7 x64 sp1, using TDM mingw x64 5.2.0 and Code::Blocks 15.12;
I compiled Irrlicht with this IDE/compiler and all went fine, every examples compiled and worked perfectly.
Code of the receiver class is taken mostly from an example code, I just added more event handling and put it in a class and .cpp file on its own:
Code: Select all
class CamelBaseReceiver : public irr::IEventReceiver{
public:
struct SMouseState MouseState;
CamelBaseReceiver();
virtual bool OnEvent(const SEvent &event);
virtual bool IsKeyDown(EKEY_CODE keyCode) const;
private:
bool KeyIsDown[KEY_KEY_CODES_COUNT];
};
Code: Select all
bool CamelBaseReceiver::OnEvent(const SEvent &event){
switch(event.EventType)
{
case EET_GUI_EVENT:
{
s32 id = event.GUIEvent.Caller->getID();
switch(event.GUIEvent.EventType)
{
// etc. etc...