所以我从源代码编译了OpenNI2,每当我尝试加载其中一个bin / samples时,我都会收到:
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]
我正在运行Mac OSX Mountain Lion。任何帮助将不胜感激。
干杯!
答案 0 :(得分:2)
根据我的经验,如果您在尝试运行程序的目录中没有OpenNI2 dylib文件,则会发生这种情况。您可以将dylib文件复制到您尝试运行程序的目录中,也可以使用手动设置的库路径(假设dylib文件位于x64-Release目录中)来预先执行程序执行: / p>
DYLD_LIBRARY_PATH=/Users/robertross/OpenSource/OpenNI2/Bin/x64-Release/ /Users/robertross/OpenSource/OpenNI2/Bin/x64-Release/NiViewer