I have lately upgraded from irrlicht 1.3 to 1.5 and the compiler "Dev_C++" has given the following error message.
In function `int main()':
cannot declare variable `receiver' to be of type `MyEventReceiver'
because the following virtual functions are abstract:
virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&)
no matching function for call to `irr::scene::ISceneManager::addHillPlaneMesh(const char[7], irr::core::dimension2d<irr::f32>, irr::core::dimension2d<irr::s32>, int, int, irr::core::dimension2d<irr::f32>, irr::core::dimension2d<irr::f32>)'
candidates are: virtual irr::scene::IAnimatedMesh* irr::scene::ISceneManager::addHillPlaneMesh(const irr::c8*, const irr::core::dimension2d<irr::f32>&, const irr::core::dimension2d<irr::u32>&, irr::video::SMaterial*, irr::f32, const irr::core::dimension2d<irr::f32>&, const irr::core::dimension2d<irr::f32>&)
thanks in advance
Problem with IEventReceiver.h
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Re: Problem with IEventReceiver.h
The signature of the OnEvent method has changed.Jim121 wrote:cannot declare variable `receiver' to be of type `MyEventReceiver'
because the following virtual functions are abstract:
virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&)
try the signature your compiler suggests:
Code: Select all
bool OnEvent(const irr::SEvent& event);
The signature of the addHillPlaneMesh method also has changed.Jim121 wrote: no matching function for call to `irr::scene::ISceneManager::addHillPlaneMesh(const char[7], irr::core::dimension2d<irr::f32>, irr::core::dimension2d<irr::s32>, int, int, irr::core::dimension2d<irr::f32>, irr::core::dimension2d<irr::f32>)'
candidates are: virtual irr::scene::IAnimatedMesh* irr::scene::ISceneManager::addHillPlaneMesh(const irr::c8*, const irr::core::dimension2d<irr::f32>&, const irr::core::dimension2d<irr::u32>&, irr::video::SMaterial*, irr::f32, const irr::core::dimension2d<irr::f32>&, const irr::core::dimension2d<irr::f32>&)
The error message tells you also what has changed.