Robert Ross
Robert Ross

Reputation: 1925

OpenNI2 Samples failing to launch

So I've compiled OpenNI2 from source and whenever I try to load one of the bin/ samples I receive this:

paperwalls:~ robertross$ /Users/robertross/OpenSource/OpenNI2/Bin/x64-Release/NiViewer ; exit;
dyld: Library not loaded: libOpenNI2.dylib
  Referenced from: /Users/robertross/OpenSource/OpenNI2/Bin/x64-Release/NiViewer
  Reason: image not found
Trace/BPT trap: 5
logout

[Process completed]

I'm running Mac OSX Mountain Lion. Any help would greatly be appreciated.

Cheers!

Upvotes: 1

Views: 1648

Answers (1)

pcjjman
pcjjman

Reputation: 116

In my experience this happens when you don't have the OpenNI2 dylib files in the directory you're trying to run the program from. You can either copy the dylib files into the directory you're trying to run the program from, or you can preface your program execution with a manually set library path like this (assuming the dylib files are in the x64-Release directory):

DYLD_LIBRARY_PATH=/Users/robertross/OpenSource/OpenNI2/Bin/x64-Release/ /Users/robertross/OpenSource/OpenNI2/Bin/x64-Release/NiViewer

Upvotes: 2

Related Questions