Compiling and running an application using SimpleOpenNI library fails to load, MacOSx

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?

  1. Compile application with proccessing.
  2. run application

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. Screen Shot 2013-11-04 at 8.22.22 PM

  • 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...

  • edited November 2013

    Give it a shot : :-B :-B

    1. You should use Processing 64 bit version on 64 bit operating system and 32 bit version on 32 bit operating system to work with SimpleOpenNI 0.2x or SimpleOpenNI 1.9x
    2. You mush have installed 64 bit version of driver/OpeNI/PrimeSense whatever on 64 bit of operating system and similarly 32 bit of driver/OpeNI/PrimeSense whatever on 32 bit of operating system
    3. But for java install both version on 64 bit operating system, if you are using one otherwise you only need to install 32 bit version of java on 32 bit operating system

    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

Sign In or Register to comment.