I'm trying to compile a simple tutorial from the examples to test out if I set Irrlicht up correctly. However I got a runtime error saying "The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library C:\Program Files (x86)\Codeblocks\mingw 4.7.0\bin\Irrlicht.dll". After investigating the issue on the forums, I've found out the it has to do with the incompatibility between the MinGW version of precompiled Irrlicht binaries and the MinGW version Code::Blocks 12.11 uses. The solution, they say, is to recompile Irrlicht.dll for your compiler. So I did that when I got 2 compile time errors:
C:\....irrlicht-1.8\source\Irrlicht\CFileSystem.cpp||In member function 'virtual irr::io::path irr::io::CFileSystem::getAbsolutePath(const path&) const':|
C:\...\irrlicht-1.8\source\Irrlicht\CFileSystem.cpp|624|error: '_fullpath' was not declared in this scope|
C:\...\irrlicht-1.8\source\Irrlicht\CIrrDeviceWin32.cpp||In member function 'void irr::CIrrDeviceWin32::getWindowsVersion(irr::core::stringc&)':|
C:\...\irrlicht-1.8\source\Irrlicht\CIrrDeviceWin32.cpp|1607|error: '_strcmpi' was not declared in this scope|
C:\...\irrlicht-1.8\source\Irrlicht\CIrrDeviceWin32.cpp|1609|error: '_strcmpi' was not declared in this scope|
C:\...\irrlicht-1.8\source\Irrlicht\CIrrDeviceWin32.cpp|1611|error: '_strcmpi' was not declared in this scope|
I have tried editing the source files and headers to include stdlib.h for _fullpath and string.h for '_strcmpi but it is like it doesn't want to see those specific includes (perhaps I put them in the wrong place).
Anyway, I need help figuring this out or if it possible to resolve the runtime error without recompiling Irrlicht that would be great too.
Compiling Irrlicht 1.8
Re: Compiling Irrlicht 1.8
Confusing. Are you using the cbp project file in source/Irrlicht?
It sounds indeed like it doesn't include stdlib.h (which you shouldn't have to add yourself as it's already included by Irrlicht). But if it doesn't find that it should give you an earlier error (about not finding that header).
It sounds indeed like it doesn't include stdlib.h (which you shouldn't have to add yourself as it's already included by Irrlicht). But if it doesn't find that it should give you an earlier error (about not finding that header).
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Compiling Irrlicht 1.8
Yes, I'm using the cbp project file.
Unfortunately, it is a weird problem. Where does Irrlicht include stdlib.h, because I suspect that it probably has to do with one of the "#ifdefine" being false somewhere, not including the header?
And no, it doesn't show a error earlier on. It just shows me that it can't find those 2 functions (I temporarily put them as extern in the header to see if that is all of them, and it happens to be only 2 of those).
Finally, can it be an issue with Windows 8?
Unfortunately, it is a weird problem. Where does Irrlicht include stdlib.h, because I suspect that it probably has to do with one of the "#ifdefine" being false somewhere, not including the header?
And no, it doesn't show a error earlier on. It just shows me that it can't find those 2 functions (I temporarily put them as extern in the header to see if that is all of them, and it happens to be only 2 of those).
Finally, can it be an issue with Windows 8?
Re: Compiling Irrlicht 1.8
It should get it from irrString.h. And no defines there. So I suspect it's not one of the ifdef's in Irrlicht, but one of the ifdef's in stdlib.h (or maybe _fullpath isn't even in there anymore on your system?). To test if that might be the case do something ugly:
Search for _fullpath in stdlib.h and just add some random signs at that place so that it fails compiling if it compiles that line. If compilation has no error then we know that it doesn't reach that and can start figuring out what's preventing it. And don't forget to revert those changes after the test or you will have messed up a system header ;-)
Search for _fullpath in stdlib.h and just add some random signs at that place so that it fails compiling if it compiles that line. If compilation has no error then we know that it doesn't reach that and can start figuring out what's preventing it. And don't forget to revert those changes after the test or you will have messed up a system header ;-)
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Compiling Irrlicht 1.8
I found _fullpath in stdlib.h and added stuff that will cause an error. No change, It seems that stdlib.h isn't being included at all.
Re: Compiling Irrlicht 1.8
Hm, I don't think that can be. It's included in irrString.h which is used a lot in CFileSystem.cpp. I suspect rather it stumbles on one of the ifdef's inside stdlib.h. You can add some crap in the first line there to be certain. And then all over the place and remove it one by one to see how far it get's and which ifdef is failing. __STRICT_ANSI__ beeing an obvious candidate. Maybe you enforce that somehwere in your c::b?
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Compiling Irrlicht 1.8
Yep that did the trick!
For people that have the same problem, just go to compiler options and add "-U__STRICT_ANSI__" (without quotes).
And as a bonus, if you did not see any change, make sure you did that in the project's build options not the compiler's.
EDIT: Is it normal for the dll to be ~30mb?
For people that have the same problem, just go to compiler options and add "-U__STRICT_ANSI__" (without quotes).
And as a bonus, if you did not see any change, make sure you did that in the project's build options not the compiler's.
EDIT: Is it normal for the dll to be ~30mb?
Re: Compiling Irrlicht 1.8
Dll in debug might be that large. Gcc puts in a lot of debug infos these days. In release it should be probably 2-3 mb.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm