macos cannot load native libraries

Started by douglaslyon, November 18, 2017, 04:19:21 PM

Previous topic - Next topic

douglaslyon

 The macosx cannot load one of the native libraries. To illustrate this issue, I have written the following test program:
public static void main(String[] args) {
        System.load("/Users/lyon/attachments/foo/jpct/lib/lwjgl-2.9.1/native/macosx/liblwjgl.jnilib");
    }
Exception in thread "main" java.lang.NoSuchMethodError: getPointer
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822)
   at java.lang.Runtime.load0(Runtime.java:809)
   at java.lang.System.load(System.java:1086)
   at nativeLibs.NativeLibDetect.main(NativeLibDetect.java:87)
Are you depending on a dylib to be somewhere it isn't?
Is there a JNA approach to the problem?
Thanks!
- Doug


EgonOlsen

To be honest, I've no clue about MacOS. Here's a thread that deals with a same error message, with some solution in the last entry: https://stackoverflow.com/questions/24283770/java-lang-nosuchmethoderror-getpointer

I'm not sure, if this applies here though. But it has to be something with your jar/native locations, I assume. I've no idea what LWJGL does here, jPCT itself doesn't do anything with native libraries, as it relies on LWJGL to handle that.