OfxOpenNI Apple Mach-O Linker (Id) Error

I have been stuck on this for a long long time. Everything compiles and links well, except for this specific library. Here’s the Github issue: https://github.com/gameoverhack/ofxOpenNI/issues/54

I followed the precise instructions to get the example code working on OS X, but whenever
I build (it compiles), (and on linking) I get the following error:

ld: library not found for -lXnFormats
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Basically the linker cannot find -lXnFormats.
What can be done to solve this error?

PS: I am using XCode 7.1 with OS X El Capitan v10.11.1.Here

I know there exists an OfxOpenNI2 plugin, but I can’t use that because I already have a codebase (that I got working on Linux).

Please let me know if I can provide more information to help debug this error. Any help would be greatly appreciated.

The problem has been resolved using the accepted answer on SO: http://stackoverflow.com/q/33681299/2302611