Compiling with MinGW, error on run: lwjgl.dll: Can't find dependent libraries

Started by imagenesis, November 29, 2008, 08:01:07

Previous topic - Next topic

imagenesis

Exception in thread "Thread-3" java.lang.UnsatisfiedLinkError: D:\java\lwjgl\libs\win32\lwjgl.dll: Can't find dependent libraries
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
   at java.lang.Runtime.loadLibrary0(Runtime.java:822)
   at java.lang.System.loadLibrary(System.java:993)
   at org.lwjgl.Sys$1.run(Sys.java:72)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
   at org.lwjgl.Sys.loadLibrary(Sys.java:81)
   at org.lwjgl.Sys.<clinit>(Sys.java:98)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:129)
   at common.Main$2.run(Main.java:86)

Now, I'm guessing it's either the native DLLs provided (jinput DLLs and the OpenAL) or it's some dependencies that MinGW is causing (which doesnt make any sense, I'm not running Cygwin).

Another weird thing is that the MinGW dll is 241kb while the provided lwjgl.dll in that latest binary is 149kb. I'm guessing this might be because you compile with Visual C++?

In anycase, I don't know why this is happening... I could of course just load up the dependent DLLs before init LWJGL (assuming they are the OpenGL/Jinputs) with Java, but why doesnt it work like the binary distribution? I probably didn't do something or compiled wrong... :(

This is what I am doing btw...

I have my project
I have the lwjgl src/java and src/generated as source directories and I am passing folder with the generated lwjgl.dll as a VM -Djava.library.path parameter... which I compiled with the mingw_ant compile target... Nothing else. I moved the generated lwjgl.dll from the /bin output directory in to the /lib/win32 directory (where the openal/jinput DLLs are)...

I've also tried running the same thing on the GearsExample while just having the lwjgl as a project with the same output (obviously).

Everything works fine with your provided binaries (even moving the OpenAL/jInput DLSs out of the provided java.library.path folder still works fine... which leads me to believe the binary provided lwjgl.dll isn't reliant on these libraries at runtime?)

imagenesis

Hey just compiled with Visual C++ and still getting the same error with MinGW... this is bizarre... I suppose I don't really need MinGW, but it's still pissing me off.

Matzon

so, visual c works - but mingw doesn't ?

I know that elias recently build lwjgl 64 bit on windows using mingw - might want to catch him (IRC seems to be the best way)