Hi,
I just changed my texture loading code from Java ImageIO to DevIL, and I'm getting an UnsatisfiedLinkError. Pretty newbish error, I probably just overlooked something, but I can't figure it out.
I've placed the following files:
DevIL.dll
ILU.dll
ILUT.dll
jinput-dxplugin.dll
lwjgl.dll
lwjgl-devil.dll
lwjgl-fmod3.dll
OpenAL32.dll
in the folders: jdk1.5.0_06\jre\bin and jre1.5.0_06\bin. So everything seems to be in the right place. I'm running off of the latest stable build.
Here's the full dump:
Exception in thread "main" java.lang.UnsatisfiedLinkError: nilGenImages
at org.lwjgl.devil.IL.nilGenImages(Native Method)
at org.lwjgl.devil.IL.ilGenImages(IL.java:337)
at engine.Loader.loadGLTexture(Loader.java:32)
at engine.Loader.loadGLTexture(Loader.java:25)
at RotatingRectangle.init(GameTest.java:23)
at engine.Game.init(Game.java:37)
at GameTest.main(GameTest.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Thanks for your help.
-Cuppo
you have called .create - right ?
Sigh...newbish indeed.
Now i'm getting :
org.lwjgl.LWJGLException: Could not load devil library.
when I call IL.create();
PS: I'm using the devil dll's that were supplied with the latest stable zip file.
Update,
I solved the IL.create() problem only to come back to the original.
I put ILU.dll and ILUT.dll into the current working directory, and IL.create() no longer throws the "Could not load devil library" exception.
But the UnsatisfedLinkError:nilGenImages is still persistent.
-Cuppo
Okay, never mind about fixing IL.create(), somehow I broke it again.
org.lwjgl.LWJGLException: Could not load devil library.
at org.lwjgl.devil.ILNative.nCreateIL(Native Method)
at org.lwjgl.devil.ILNative.createIL(ILNative.java:64)
at org.lwjgl.devil.IL.create(IL.java:583)
at engine.Game.init(Game.java:42)
at GameTest.main(GameTest.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
I really hit a wall here. ILU.dll, ILUT.dll, DevIL.dll, are still in my working directory, as well as in <jdkPath>/jre/bin and <jrePath>/bin.
Any help would be much appreciated.
-Cuppo
Mmmm humble pie....
Sorry about all that. I discovered lo and behold, that IL.dll is not actually in my working directory. Note to self: always check what your working directory actually is...
and also I forgot to call ILU.create()
My apologies everyone. And thx Matzon, henceforth I shall pay more attention to your advice.
-Cuppo
great - then just one more advice - remove the dlls you put in JRE\bin and place it in working dir or ./natives dir
When you put it in the JRE installation folder it will always load those - so when you get a new version of lwjgl (and you have forgotten about those files in \bin) it will load the old one.