cannot allocate an object of type

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.
Post Reply
full_newbie
Posts: 27
Joined: Mon Apr 05, 2010 7:33 am

cannot allocate an object of type

Post by full_newbie »

I am use http://irrlicht.sourceforge.net/phpBB2/ ... sc&start=0
Please help! I am getting errors:

Code: Select all

CGUISlotWindow.cpp:233: error: cannot allocate an object of type `irr::gui::CGUIBringUpSlotWindowButton'
CGUISlotWindow.cpp:233: error:   because the following virtual functions are abstract:
IGUIButton.h:128: error:  virtual void irr::gui::IGUIButton::setScaleImage(bool)
IGUIButton.h:131: error:  virtual bool irr::gui::IGUIButton::isScalingImage() const
What happens?
Sorry, my english is very bad. | I use minGW+CodeBlocks+Irrlicht 1.7.1(1.6,1.5)
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I don't know that class, but that error means that you derived from a class with pure virtual functions and did not add an implementation for those functions. Just add any implementation for setScaleImage and isScalingImage (they can be empty or just return true or false in the latter case) and it should compile.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply