Page 5 of 8

Posted: Sat Jan 10, 2009 12:24 am
by IceFire_darkalex
I'm getting crazy here >.<

Included the gheaders and addet the cpp Files to the Project.

When compiling I get ONE funking ERROR >.<

Would be verry verry nice if anyone could help:

Code: Select all

int main...

		device->getFileSystem()->addZipFileArchive("data/TexSkiMod.zip", true, false); //Main Data Archive

		// Load GUI Skin
		SImageGUISkinConfig guicfg = LoadGUISkinFromFile(guienv->getFileSystem(), driver, "gui/guiskin.cfg");
		CImageGUISkin *skin = new CImageGUISkin(guienv->getVideoDriver(), (IGUISkin *)guienv->getSkin()); //<--------HERE IS LINE 50!
		skin->loadConfig(guicfg);
		gui::IGUIFont* font = guienv->getFont("fonts/defaultfont.bmp");
		if (font != 0)
			skin->setFont(font, gui::EGDF_DEFAULT);
		guienv->setSkin(skin);
		skin->drop();

...
Error message:

Code: Select all

1>Main.cpp
1>c:\dokumente und einstellungen\meep\desktop\test3d\application\client\main.cpp(50) : error C2259: 'irr::gui::CImageGUISkin' : cannot instantiate abstract class
1>        due to following members:
1>        'void irr::gui::IGUISkin::draw3DTabButton(irr::gui::IGUIElement *,bool,const irr::core::rect<T> &,const irr::core::rect<T> *,irr::gui::EGUI_ALIGNMENT)' : is abstract
1>        with
1>        [
1>            T=irr::s32
1>        ]
1>        c:\dokumente und einstellungen\meep\desktop\test3d\application\irrmix\iguiskin.h(464) : see declaration of 'irr::gui::IGUISkin::draw3DTabButton'
1>        'void irr::gui::IGUISkin::draw3DTabBody(irr::gui::IGUIElement *,bool,bool,const irr::core::rect<T> &,const irr::core::rect<T> *,irr::s32,irr::gui::EGUI_ALIGNMENT)' : is abstract
1>        with
1>        [
1>            T=irr::s32
1>        ]
1>        c:\dokumente und einstellungen\meep\desktop\test3d\application\irrmix\iguiskin.h(475) : see declaration of 'irr::gui::IGUISkin::draw3DTabBody'
1>CImageGUISkin.cpp
1>Generating Code...
1>Build log was saved at "file://c:\Dokumente und Einstellungen\meep\Desktop\test3d\Application\Client\BuildLog.htm"
1>Test-3D-Project - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ==========

Posted: Sat Jan 17, 2009 9:37 pm
by full.metal.coder
it looks like two method signatures have changed in a recent Irrlicht release and the code of this skin has not been updated.

You need to edit the iguiskin.h header (and presumably the iguiskin.cpp or cguiskin.cpp) to change the method signatures accordingly (probably just a const keyword to add somewhere or something similar... just compare the signature in those files to the one expected by the compiler, as reported in the error message)

Posted: Fri May 22, 2009 5:43 pm
by Nakid
Hmm someone fixed this problem ? :S

Posted: Sat May 23, 2009 9:32 am
by Nakid
Can someone give a fix for this problem ? :

Code: Select all

>Main.cpp
1>c:\dokumente und einstellungen\meep\desktop\test3d\application\client\main.cpp(50) : error C2259: 'irr::gui::CImageGUISkin' : cannot instantiate abstract class
1>        due to following members:
1>        'void irr::gui::IGUISkin::draw3DTabButton(irr::gui::IGUIElement *,bool,const irr::core::rect<T> &,const irr::core::rect<T> *,irr::gui::EGUI_ALIGNMENT)' : is abstract
1>        with
1>        [
1>            T=irr::s32
1>        ]
1>        c:\dokumente und einstellungen\meep\desktop\test3d\application\irrmix\iguiskin.h(464) : see declaration of 'irr::gui::IGUISkin::draw3DTabButton'
1>        'void irr::gui::IGUISkin::draw3DTabBody(irr::gui::IGUIElement *,bool,bool,const irr::core::rect<T> &,const irr::core::rect<T> *,irr::s32,irr::gui::EGUI_ALIGNMENT)' : is abstract
1>        with
1>        [
1>            T=irr::s32
1>        ]
1>        c:\dokumente und einstellungen\meep\desktop\test3d\application\irrmix\iguiskin.h(475) : see declaration of 'irr::gui::IGUISkin::draw3DTabBody'
1>CImageGUISkin.cpp
1>Generating Code...
1>Build log was saved at "file://c:\Dokumente und Einstellungen\meep\Desktop\test3d\Application\Client\BuildLog.htm"
1>Test-3D-Project - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 3 up-to-date, 0 skipped ========== 

Thanks you

Fix

Posted: Thu Jun 04, 2009 7:27 pm
by t0rt0r0
Hi,

Here is a fixed source : edit : see bottom ;)

Enjoy ;)

Ps : it's just a fix, i just added new method signature but new parameters aren't use, but seems to work ...

Posted: Sat Jun 06, 2009 9:57 am
by Jookia
Using your selection, I get..

Code: Select all

..\irrlicht-SVN\include\skin\SkinLoader.h|34|warning: no newline at end of file|
C:\Documents and Settings\Administrator\My Documents\My Projects\C++\Vox\Break Things\source\main.cpp||In constructor `CMain::CMain()':|
C:\Documents and Settings\Administrator\My Documents\My Projects\C++\Vox\Break Things\source\main.cpp|40|error: cannot allocate an object of type `irr::gui::CImageGUISkin'|
C:\Documents and Settings\Administrator\My Documents\My Projects\C++\Vox\Break Things\source\main.cpp|40|error:   because the following virtual functions are abstract:|
..\irrlicht-SVN\include\IGUISkin.h|466|error:  virtual void irr::gui::IGUISkin::draw3DTabButton(irr::gui::IGUIElement*, bool, const irr::core::rect<irr::s32>&, const irr::core::rect<irr::s32>*, irr::gui::EGUI_ALIGNMENT)|
..\irrlicht-SVN\include\IGUISkin.h|479|error:  virtual void irr::gui::IGUISkin::draw3DTabBody(irr::gui::IGUIElement*, bool, bool, const irr::core::rect<irr::s32>&, const irr::core::rect<irr::s32>*, irr::s32, irr::gui::EGUI_ALIGNMENT)|
||=== Build finished: 4 errors, 1 warnings ===|

Posted: Sat Jun 06, 2009 11:00 am
by t0rt0r0
Strange, it worked on my computer using dev c++ and irrlicht 1.5

I'm not at home for now so I can't debug this, maybe I've made a mistake when uploading :?

Posted: Mon Jun 08, 2009 5:57 pm
by t0rt0r0
I updated the rar above with correct (sure ^^) files ;)

Hope it works not only on my computer ;)

Posted: Wed Jun 10, 2009 6:20 pm
by Jookia
To make it more portable so you don't have to include it into your project files, I've used t0rt0r0's code and edited it to be a simple folder that you can include.

Download links. Unless the whole world explodes, atleast one will be up.

Code: Select all

http://willhostforfood.com/access.php?fileid=69788
http://www.zshare.net/download/611971668708b97c/
http://www.badongo.com/file/15398615
http://rapidshare.com/files/243083038/Klagui_Portable.zip.html
http://www.megaupload.com/?d=DL1WYNC3
http://depositfiles.com/files/esymsc4cx

Posted: Wed Jun 10, 2009 6:31 pm
by t0rt0r0
Great,
I've removed my link ;)

Posted: Wed Jun 10, 2009 7:05 pm
by Jookia
Actually, you should keep your link since I just realized that I was using Irrlicht 1.6 and it needed a small code change.

Posted: Thu Jun 11, 2009 7:07 am
by t0rt0r0
I'll upload my dev c++ project in the day, because i've already removed the link ... :/

Posted: Thu Jun 11, 2009 10:31 am
by Jookia
I'm pretty sure it's just a dimension2d thing anyway.

Posted: Fri Jun 12, 2009 5:52 pm
by Ovan
i just modifing draw2DRectangle for my game, it's so funy :

Code: Select all

        void GameSkin::draw2DRectangle(IGUIElement* element, const SColor &color,const core::rect<s32>& pos, const core::rect<s32>* clip)
        {
//            FallbackSkin->draw2DRectangle(element, color, pos, clip);
            if(pos.UpperLeftCorner.X  >= element->getAbsolutePosition().UpperLeftCorner.X  && pos.UpperLeftCorner.Y  >= element->getAbsolutePosition().UpperLeftCorner.Y)
            if(pos.LowerRightCorner.X <= element->getAbsolutePosition().LowerRightCorner.X && pos.LowerRightCorner.Y <= element->getAbsolutePosition().LowerRightCorner.Y)
            {
                SImageGUIElementStyle tmp = *&Config.SunkenPane;
                tmp.Color = color;
                drawElementStyle(tmp,pos,clip);
            }
        }
sorry for my english i'm french :P

Posted: Thu Aug 06, 2009 12:39 pm
by lpcpp
Nice one.Thanks