We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a mac osx 10.8 and I am using SimpleOpenNI library that is giving trouble when compiling an application. When just running the processing sketch, it runs no problem. But it won't work with a compiled app. How can I run a compiled application for a Mac using the SimpleOpenNI library???
This is similar to this forum but the solution presented here is not working for my problem on a mac : https://code.google.com/p/simple-openni/issues/detail?id=73
What steps will reproduce the problem?
What is the expected output? What do you see instead? Application fails to load openni libs with error:
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: SimpleOpenNI.SimpleOp
at SimpleOpenNI.SimpleOpenNiJNI.swig_module_init(Native Method)
at SimpleOpenNI.SimpleOpenNIJNI.(SimpleOpenNIJNI.java:290)
at SimpleOpenNI.ContextWrapper.(ContextWrapper.java:54)
at SimpleOpenNI.SimpleOpenNI.(SimpleOpenNi.java:256)
at LanScapesLerp.setup(LanScapesLerp.java:126)
at processing.core.PApplet.run(PApplet.java:1530)
at processing.core.PApplet.handleDraw(PApplet.java:1608)
at java.lang.Thread.run(Thread.java:680)
Answers
Looks like the Java part of the library doesn't see the native part (shared library, .dll on Windows, .so on Linux, I don't remember the extension on Mac), check if all the files from the library are copied in the exported application (in the lib folder, I think).
I'm not sure how to know this - This is what the structure of the contents of the application I exported look like.
OH i just checked Processing/libraries/SimpleOpenNI/library and the folders that I think I need are totally the same that are in my exported application folder /contents/java .
NITE2, osx, SimpleOpenNI.jar, libSimpleOpenNI.jnilib are all there in the java part of the library. so i'm therefore confused what this error is about that: Can't load SimpleOpenNI , verify if you installed SimpleOpenNI correctly...
Give it a shot : :-B :-B
It happened to me once and it was just this. I did the same as i wrote to you and it worked for me
Just go into the application package contents/java/, delete the folders "osx" and "NiTE" and copy the whole SimpleOpenNI folder to this directory.
fubbi
So I got some questions about this and to clarify:
the folder is ...yourapplication/Contents/Java/_simpleOpenNi/
because the link part in that error /SimpleOpenNI/library/libSimpleOpenNI.jnilib is a relative link and that relation turned out to be to the java folder, like this ...yourapplication/Contents/Java/SimpleOpenNI/library/libSimpleOpenNI.jnilib
hope it works for you