Can't get samples to run on OSX

I’m using the Openni 2 drivers to connect to OSX 10.11.2. When I run the samples in the bin directory I get the error below. I have run the install script and added the include and the redist folders to my path.

user:~ user$ /Users/user/OpenNI-MacOSX-x64-2.2/Samples/Bin/SimpleRead ; exit;
dyld: Library not loaded: libOpenNI2.dylib
  Referenced from: /Users/user/OpenNI-MacOSX-x64-2.2/Samples/Bin/SimpleRead
  Reason: image not found
Trace/BPT trap: 5

When I try to build the samples from the folders I get the error:

main.cpp:22:10: fatal error: 'OpenNI.h' file not found
#include <OpenNI.h>

Does anyone have any suggestions?

Have you tried running the samples from the bin directory? Try, for instance, in terminal:

cd /Users/user/OpenNI-MacOSX-x64-2.2/Samples/Bin

1 Like

If I run from terminal as suggested most of the samples don’t work but SimpleViewer and ClosestPointViewer do work. Still not able to build any of the samples.