Rename Irrlicht.dll

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Rename Irrlicht.dll

Post by CuteAlien »

For some reason the usual system libraries are not linked in. Not quite sure why - they are all mentioned in the c::b project file as far as I can see (you can see them in the linker tab). The dll had worked in the same project?
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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Rename Irrlicht.dll

Post by LunaRebirth »

The DLL works, yes.
But after I did the static linking, then I used the .a file and moved the .dll out, it gives 50 errors.
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Rename Irrlicht.dll

Post by LunaRebirth »

Maybe I should post some stuff I'm doing, and see if anyone can pinpoint an error?

--Linker settings:
Irrlicht
path/libirrlicht.a

--Search directories:
--Compiler
path/include
--Linker
path/lib

--Compiler settings:
--Defines
_IRR_STATIC_LIB_

--Other options
-fexceptions

--My included headers

Code: Select all

#include <windows.h>
#include <signal.h>
#include <iostream>
#include <vector>
#include "Irrlicht.h"
Idk what other info is needed here, though.
Let me know if there's anything I need to check please

Thanks!

EDIT:
Otherwise, and I know this is going to sound needy-needy. But I would really like to solve this ASAP, so if no solution found, could someone possibly send me their static .a?? Or would that not work
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Rename Irrlicht.dll

Post by hendu »

Nothing wrong with your .a file. The missing ones are Windows functions - your project needs to link some Windows libs in addition.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Rename Irrlicht.dll

Post by CuteAlien »

Forget about headers, those are about compiling source-code and you have done that. Unresolved externals are linker errors and like hendu said there are some Windows libs missing in linking. But I'm a little confused - as you should have them - as far as I can see the static build target links system libraries as well. But you can try the following - check the linker section in the Irrlicht project file and put all the libs mentioned there into your application as well. And when you build the project look out if there are any warnings/errors about libraries being not found.
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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Rename Irrlicht.dll

Post by LunaRebirth »

Okay these were in the Irrlicht Linker libraries:
kernal32
user32
gdi32
winspool
comdlg32
advapi32
shell32
ole32
oleaut32
uuid
opengl32
winmm

After taking all of those and adding them to my project, I get the following errors:

Code: Select all

cannot find -lkernal32
cannot find -loleanut32
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Rename Irrlicht.dll

Post by CuteAlien »

You probably have to install the w32api package for mingw (code::blocks is using mingw).
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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Rename Irrlicht.dll

Post by LunaRebirth »

And how do I install that?
I don't see it on the plugins and I don't want to download a version incompatible/from a site with viruses

I do have w32api.h, though. Sooo I don't see why I wouldn't have the w32api package
(I see one on Sourceforge from mingw.org, but the file type is .lzma and I cannot extract it. When I do, it says "File size too big" and IZarc, which is my main extracter, says it's unsupported)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Rename Irrlicht.dll

Post by CuteAlien »

w32api.h is a header. Your problem is not about headers or compiling - it's about linking, which means a library is missing (aka a .lib or .a file). You have the interface, you miss the implementation of it. I remember last time I had a .lzma it also took me a while to figure out how to decompress it on Windows. Maybe 7-zip works (which is a great tool anyway). Otherwise you might have to google around. It's a little annoying mingw uses such an unusual compression format (they use it because it's a little bit better than others), but that's probably just the file you need.
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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Rename Irrlicht.dll

Post by LunaRebirth »

Oh woops.
After downloading 7Zip and extracting then adding the files appropriately, I found it STILL didn't work.
It's kernel32, not kernal32.
And it's oleaut32, not oleanut32.

Stupid me. Sorry about that :/

Anywho, after getting that set up, I now get 9 errors (Instead of the previous 50)

Code: Select all

undefined reference to `__gxx_personality_sj0'|
undefined reference to `_Unwind_SjLj_Register'|
undefined reference to `_Unwind_SjLj_Unregister'|
undefined reference to `_Unwind_SjLj_Resume'|
undefined reference to `__gxx_personality_sj0'|
undefined reference to `_Unwind_SjLj_Register'|
undefined reference to `_Unwind_SjLj_Unregister'|
undefined reference to `_Unwind_SjLj_Resume'|
undefined reference to `__gxx_personality_sj0'|
EDIT:
Looked up the problem. http://www.cplusplus.com/forum/windows/28078/ did not work.
Saw this http://stackoverflow.com/questions/7751 ... nality-sj0 apparently I'm using an incompatible version, possibly?
(Yes, I compiled the Irrlicht engine with the same Code::Blocks as my project. So that couldn't be it..? Read this from http://irrlicht.sourceforge.net/forum/v ... =1&t=47489)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Rename Irrlicht.dll

Post by CuteAlien »

I also can only google that stuff. But if you don't need exceptions in your code you can disable them (Irrlicht doesn't use exceptions). Under compiler settings - other options add the following line:
-fno-exceptions

edit: Ah - I think I get the problem.
I suspect you use c::b version which comes with mingw include. And that mingw has another version than the mingw used in c::b. Just disabling exception might fix the linker warnings, but there's a high risk stuff still wouldn't work correct.
So 2 solutions around that... first is to find a lib of exactly that mingw version (not sure how to find that out - google helps I hope - or c::b forums). The other solution is probably the better one. De-install mingw and c::b. Then install mingw new from the official sources. Or maybe use mingw-64 which is said to be better. And then install c::b without mingw included so it uses that mingw on your system. Then you have a clean and new mingw installation which is probably the better solution in the long run. Otherwise ask around in the code::blocks forums, they can help with this probably better.
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
Seven
Posts: 1034
Joined: Mon Nov 14, 2005 2:03 pm

Re: Rename Irrlicht.dll

Post by Seven »

LOL!

This made my day, and maybe you could just go buy her some flowers or something. That is all I have to say about this thread :)
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Rename Irrlicht.dll

Post by CuteAlien »

@Seven: Hey, I always help when people ask clear questions :-)
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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Rename Irrlicht.dll

Post by LunaRebirth »

Seven wrote:LOL!

This made my day, and maybe you could just go buy her some flowers or something. That is all I have to say about this thread :)
Wow I'm so sorry this is my first time using Irrlicht, let alone anything 3D or any engines.

And you know what, I could've been like 90% of other forums and get on here going "help how to Irrlicht" but I didn't. I did research. Each time I had a new problem I tried looking up as many links that I was provided with.

But thanks CuteAlien for the help.
At least you have some decency.:)
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Rename Irrlicht.dll

Post by LunaRebirth »

Sweeeet thank you CuteAlien. I finally got it working.
I'm still not sure the problem, I just redownloaded Irrlicht-1.8.1 and made a new project for my program.
I then copy&pasted what I had before, then went through everything mentioned here.
Had a few different errors (Used to have 50, fixed, then 9. This time I got 19, so I found the problem) fixed it, and it was working fine :P

After I saw it working, I had to double-check I didn't leave Irrlicht.dll in the folder because I couldn't believe it.
Thanks again!!!!!!!!!!!!!!!!!!!!!!!!
Post Reply