How can I get past a “Library not loaded:” issue?

血红的双手。 提交于 2020-01-05 11:33:39

问题


I started playing with the Kinect and I would like to use skeleton tracking using OpenNI. Since my knowledge of c++ is limited, the easiest option is to use the ofxOpenNI addon for OpenFrameworks.

I've downloaded the addon, and successfully compiled the example, but the application can't load a dylib:

[Session started at 2011-02-24 11:46:27 +0000.]
dyld: Library not loaded: @executable_path/./../../../data/openni/lib/libnimCodecs.dylib
  Referenced from: /Users/george/Downloads/FirefoxDownloads/of_preRelease_v0062_osx_FAT/apps/examples/NI_userIsolation_4/bin/emptyExampleDebug.app/Contents/MacOS/emptyExampleDebug
  Reason: no suitable image found.  Did find:
    /Users/george/Downloads/FirefoxDownloads/of_preRelease_v0062_osx_FAT/apps/examples/NI_userIsolation_4/bin/emptyExampleDebug.app/Contents/MacOS/./../../../data/openni/lib/libnimCodecs.dylib: unknown required load command 0x80000022
    /Users/george/Downloads/FirefoxDownloads/of_preRelease_v0062_osx_FAT/apps/examples/NI_userIsolation_4/bin/emptyExampleDebug.app/Contents/MacOS/./../../../data/openni/lib/libnimCodecs.dylib: unknown required load command 0x80000022
    /usr/lib/libnimCodecs.dylib: unknown required load command 0x80000022

The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).

I am using XCode on osx 10.5.8 with OpenFrameworks 062.

This was a bit of background, but I imagine the dylib problem is something general.

I have the requested dylib files in my project, and the path seems ok. Any clues ?


回答1:


Sounds like the libs, though present, aren't compatible with your system -- it finds them but can't load them.

And indeed, checking the README on the OpenNI github page, in the section "Release Notes", we find the following:

* MacOSX: Only OSX 10.6 (Snow Leopard) with an Intel based CPU is currently supported.

You have the source, obviously, but fixing this yourself would probably be quite a chore. Otherwise, you could wait and see if future releases add Leopard compatibility, or you could upgrade your OS.



来源:https://stackoverflow.com/questions/5104344/how-can-i-get-past-a-library-not-loaded-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!