How to run the OpenNI samples on a Mac?



I got the OpenNI SDK for Mac from this link: I am not sure how I can make this work.

Do I need to run the “” file first ? When I do I get a file “OpenNIDevEnvironment” that contains two export lines.

I tried compiling some samples using “make” but I get multiple compiler errors…

Anybody succeeded running any examples ?


Could you be a little more descriptive of the issues you are having installing OpenNI 2? What compiler errors are you getting?

Any screenshots or screen recordings would be helpful.


Ok so I got the “SDK” from

If I run the script from the extracted files I get this file OpenNIDevEnvironment
which contains these 2 lines of code:

export OPENNI2_INCLUDE=/Users/user/Projects/OpenNI/OpenNI-MacOSX-x64-2.2/Include
export OPENNI2_REDIST=/Users/user/Projects/OpenNI/OpenNI-MacOSX-x64-2.2/Redist

I assumed that I have to run these lines on my terminal so I do.

A simple example such as “SimpleViewer” - here are the files:

I run make to build it and I get more than 20 errors, here are some: