I can't load the gluegen-rt.dll 64bits library
Asked Answered
P

2

12

Here are the libraries I have added:

-gluegen-rt-natives-windows-amd64

-gluegen-rt

-jogl-all-natives-windows-amd64

-jogl-all

This is the exception I get:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: C:\Users\KamyluKuna\Documents\NetBeansProjects\OpenGL\natives\windows-i586\\gluegen-rt.dll at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1828) at java.lang.Runtime.load0(Runtime.java:792) at java.lang.System.load(System.java:1059) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:624) at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:63) at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:106) at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:487) at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:421) at com.jogamp.common.os.Platform$1.run(Platform.java:317) at java.security.AccessController.doPrivileged(Native Method) at com.jogamp.common.os.Platform.<clinit>(Platform.java:287) at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:147) at opengl.Lesson1.AppRoot.initGLObjects(AppRoot.java:50) at opengl.Lesson1.AppRoot.<init>(AppRoot.java:134) at opengl.Lesson1.App.<init>(App.java:14) at opengl.Lesson1.App.main(App.java:41) Java Result: 1

Ptisan answered 16/10, 2015 at 20:43 Comment(2)
Here are the librarys that i have added: gluegen-rt-natives-windows-amd64, gluegen-rt, jogl-all-natives-windows-amd64, jogl-all,Ptisan
Hi Camilo, you should improve your question, add some details, for example what you have, what you tried and so on.. Which IDE do you use?Ibson
A
7

You probably use a 32-bit JVM on a 64-bit operating system. Then, GlueGen tries to find the 32-bit native libraries whereas you provide only the 64-bit native libraries. Either provide the 32-bit native libraries or use a 64-bit JVM or use jogamp-fat.jar (it contains both the native libraries and the Java libraries of JogAmp) instead of using the separate JARs.

By the way, you don't indicate what you mean by "the libraries I have added". Put the JARs containing the native libraries into the same directory than the one containing the Java libraries and add the JARs containing the Java libraries into the classpath or just put jogamp-fat.jar into the classpath (the easiest and the least error prone solution).

You can follow these instructions of our wiki.

Articulate answered 17/10, 2015 at 21:33 Comment(4)
thanks. i am using 32Bt JVM on a 64Bits operating system. i tried to replace the 64Bts jars by the 32Bts ones and it worked just fine, thanks. I am using NetBeans 7.3Ptisan
As it works for you, why haven't you accepted my answer?Articulate
@Articulate I seem to have the same problem, though I don't have any 32bit JVM installed. Any clues on why it still complains? Although in my case, the application seems to look directly in C:\Windows\System32\natives\windows-amd64\\gluegen-rt.dllBioscope
@Bioscope Use jogamp-fat.jar instead of separate JARs. In your case, maybe it doesn't find the correct native libraries. jogamp-fat.jar contains all Java and native JogAmp (JOGL, JOCL, JOAL GlueGen) libraries inside a single JAR, it's heavier but less error prone.Articulate
L
2

For me, I was running a Maven project in IntelliJ with these dependencies:

    <dependency>
        <groupId>org.jogamp.jogl</groupId>
        <artifactId>jogl-all-main</artifactId>
        <version>2.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.jogamp.gluegen</groupId>
        <artifactId>gluegen-rt</artifactId> <!-- This is incorrect -->
        <version>2.3.2</version>
    </dependency>

After changing the second dependency from gluegen-rt to gluegen-rt-main, the error went away.

Leenaleeper answered 26/9, 2021 at 1:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.