LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: CaptainJester on November 12, 2004, 03:20:31

Title: DevIL problems
Post by: CaptainJester on November 12, 2004, 03:20:31
I put in the rest of the methods for the main library(IL) in and uploaded to CVS.  When I compile and run the test, I get an UnsatisfiedLinkError.  However it is loading the library(lwjgl-devil.dll) successfully.  When I look inside the library, I don't see any of the method signatures.  (eg when I look in lwjgl.dll I can find all the method signatures such as glEnable etc...).  I don't know a lot about 'C' compiler options, so that could be causing the problem.

Any thoughts?
Title: DevIL problems
Post by: Matzon on November 12, 2004, 06:14:48
The problem is that lwjgl-devil.dll isn't dynamically loading its methods like lwjgl.dll does. Therefore you don't see any methods.
I speculate that this isn't a problem unlike lwjgl.dll, since *everybody* distributes devil.dll along if they use devil! This is not the case with lwjgl, where someone might choose not to use openal - which is why it is dynamically loading the stuff it needs.

I'll just try the new version and report back...
Title: DevIL problems
Post by: Matzon on November 12, 2004, 06:28:29
right - that'll be after work, since I have some uncommited string code - get back to you in 8+ hours :)
Title: DevIL problems
Post by: Matzon on November 13, 2004, 18:12:02
got the same error as you - easy fix.

You #ifdef the whole implementation out, by using:
#ifdef __cplusplus
but failing to #endif the following line :)

I have fixed this, and will commit later, when I have some other stuff in.


--- org_lwjgl_devil_IL.c 12 Nov 2004 02:54:31 -0000 1.4
+++ org_lwjgl_devil_IL.c 13 Nov 2004 18:24:41 -0000
@@ -5,6 +5,7 @@

#ifdef __cplusplus
extern "C" {
+#endif

@@ -717,5 +718,4 @@

#ifdef __cplusplus
}
-#endif
-#endif
+#endif
Title: DevIL problems
Post by: CaptainJester on November 13, 2004, 22:42:03
Whoops.  Thanks.

Broke the cardinal rule.  Check your code before you blame anything else. :oops: