Problem with equalsByUlp since Irrlicht 1.8

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.
Memorial76
Posts: 103
Joined: Mon Aug 10, 2009 8:22 pm
Location: France

Problem with equalsByUlp since Irrlicht 1.8

Post by Memorial76 »

I've just installed Irrlicht 1.8 and I have a new error code when building solution:
5>GuiTest.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
5>IrrGerap.lib(SceneTreeView.obj) : error LNK2005: "public: __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::Float_t(float)" (??0Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@QAE@M@Z) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(SceneTreeView.obj) : error LNK2005: "public: bool __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::sign(void)const " (?sign@Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@QBE_NXZ) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(SceneTreeView.obj) : error LNK2005: "public: __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::Float_t(float)" (??0Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@$$FQAE@M@Z) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(SceneTreeView.obj) : error LNK2005: "public: bool __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::sign(void)const " (?sign@Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@$$FQBE_NXZ) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(EventReceiver.obj) : error LNK2005: "public: __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::Float_t(float)" (??0Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@QAE@M@Z) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(EventReceiver.obj) : error LNK2005: "public: bool __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::sign(void)const " (?sign@Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@QBE_NXZ) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(EventReceiver.obj) : error LNK2005: "public: __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::Float_t(float)" (??0Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@$$FQAE@M@Z) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(EventReceiver.obj) : error LNK2005: "public: bool __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::sign(void)const " (?sign@Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@$$FQBE_NXZ) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(GuiManager.obj) : error LNK2005: "public: __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::Float_t(float)" (??0Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@QAE@M@Z) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(GuiManager.obj) : error LNK2005: "public: bool __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::sign(void)const " (?sign@Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@QBE_NXZ) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(GuiManager.obj) : error LNK2005: "public: __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::Float_t(float)" (??0Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@$$FQAE@M@Z) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>IrrGerap.lib(GuiManager.obj) : error LNK2005: "public: bool __thiscall `bool __cdecl irr::core::equalsByUlp(float,float,int)'::`2'::Float_t::sign(void)const " (?sign@Float_t@?1??equalsByUlp@core@irr@@YA_NMMH@Z@$$FQBE_NXZ) already defined in IrrGerap.lib(GuiMetaElement.obj)
5>C:\Users\PROPRIETAIRE\Documents\Visual Studio 2010\Projects\LibTest\Debug\LibTest.exe : fatal error LNK1169: one or more multiply defined symbols found
5>
5>Build FAILED.
I mention that i didn't change anything in my code exept that I installed Irrlicht 1.8
My Gui/Event receiver Architecture Pattern (GERAP):
http://irrgerap.sourceforge.net/

My Blog about my "ProjectOne"
http://memorial76-project-one.blogspot.fr/
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by CuteAlien »

Seems you also have a Float_t in your headers :-(

I didn't expect this to be a problem, isn't that inside the irrlicht namespace? I have to experiment a little... as a workaround - modify in irrMath.h in when the Float_t and just rename it for example to irrFloat_t. You don't even need to recompile the library for that (you can, but it doesn't matter). I probably have to change that for next version. But maybe also take a look that you don't have some global "using namespace irr" somewhere.
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
Memorial76
Posts: 103
Joined: Mon Aug 10, 2009 8:22 pm
Location: France

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by Memorial76 »

Thanks for your answer.

I don't know if I have a Float_t anywhere. Yet, I tried to replace Float_t with irrFloat_t and It didn't work. Maybe this is due to the fact that I use Irrlicht through Irrlicht.dll. I should then rebuid Irrlicht, shouldn't I?
But I don't know how to do it. Which .sln should I load?
My Gui/Event receiver Architecture Pattern (GERAP):
http://irrgerap.sourceforge.net/

My Blog about my "ProjectOne"
http://memorial76-project-one.blogspot.fr/
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by CuteAlien »

No, there shouldn't even need to be a need to rebuild it. But looking more at the error - it seems to use the namespace, so this shouldn't even happen. What is this IrrGerap lib?

edit: Ok, seeing it in your .sig right now.
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
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by CuteAlien »

You are using using namespace irr; in a header. I'm not yet certain how this is related (only took a quick 1-minute look at your lib), but this is something you should never do. Write the full names in headers. The using namespace thing should only ever be used in .cpp files.
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
Memorial76
Posts: 103
Joined: Mon Aug 10, 2009 8:22 pm
Location: France

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by Memorial76 »

I try this. It may take a little time to fix all files...
Thanks
My Gui/Event receiver Architecture Pattern (GERAP):
http://irrgerap.sourceforge.net/

My Blog about my "ProjectOne"
http://memorial76-project-one.blogspot.fr/
Memorial76
Posts: 103
Joined: Mon Aug 10, 2009 8:22 pm
Location: France

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by Memorial76 »

I tried, but nothing changes... :(
My Gui/Event receiver Architecture Pattern (GERAP):
http://irrgerap.sourceforge.net/

My Blog about my "ProjectOne"
http://memorial76-project-one.blogspot.fr/
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by CuteAlien »

Still better not having this in headers. But I have downloaded your code from sourceforge, I will try to find some time on the weekend to test out what's going on.
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
Memorial76
Posts: 103
Joined: Mon Aug 10, 2009 8:22 pm
Location: France

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by Memorial76 »

Thanks a lot for your interest.
This code is quite an old version. Anyway, it is something interesting to have an external look at it.
My Gui/Event receiver Architecture Pattern (GERAP):
http://irrgerap.sourceforge.net/

My Blog about my "ProjectOne"
http://memorial76-project-one.blogspot.fr/
Memorial76
Posts: 103
Joined: Mon Aug 10, 2009 8:22 pm
Location: France

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by Memorial76 »

For now I just removed the equalsByUlp function from irrMath.h and it works.
My Gui/Event receiver Architecture Pattern (GERAP):
http://irrgerap.sourceforge.net/

My Blog about my "ProjectOne"
http://memorial76-project-one.blogspot.fr/
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by CuteAlien »

The code you have on sourceforge compiles here (using VS 2020). But it seem to be rather old, so probably not the same code. Can't help without having an example to reproduce this... please update the code there or produce some example with which I can test this.
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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by hybrid »

VS 2020 :shock:
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by CuteAlien »

+/- one decade ;-)
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
Memorial76
Posts: 103
Joined: Mon Aug 10, 2009 8:22 pm
Location: France

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by Memorial76 »

Sorry for the delay,
I uploaded the new version of IrrGerap. I removed the example project and just provided all required (I hope) .h and .cpp.

Do not hesitate to DL, test and tell me if something goes wrong.
Thanks a lot
My Gui/Event receiver Architecture Pattern (GERAP):
http://irrgerap.sourceforge.net/

My Blog about my "ProjectOne"
http://memorial76-project-one.blogspot.fr/
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problem with equalsByUlp since Irrlicht 1.8

Post by CuteAlien »

Hm, Sourceforge release isn't really thought for putting individual source-files there. For that you should use svn (otherwise one has to download each file one-by-one by hand now).

Also removing project files is not a good idea - I need _exactly_ what you have to reproduce the problem. I just added all your files into a project file, but that was again just a waste of time as I can't reproduce it that way. Please give me a project which fails compiling (well, linking in this case) - I have otherwise no idea how to reproduce that problem as it doesn't really make sense to me so far. Maybe you use some specific flags, or do static linking or... I really can't tell.
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