0

I'm developing an app in objective-C++ that uses dynamic libraries of OpenCV and VTK but I've a problem on distribution, if I launch my app in a different system I got this issue:

Dyld Error Message:

  Library not loaded: @executable_path/../Frameworks/libvtkCommon.5.6.1.dylib
  Referenced from: /myApp.app/Contents/MacOS/myApp
  Reason: no suitable image found.  Did find:
    /myApp.app/Contents/MacOS/../Frameworks/libvtkCommon.5.6.1.dylib: open() failed with errno=13
    /myApp.app/Contents/MacOS/../Frameworks/libvtkCommon.5.6.1.dylib: open() failed with errno=13

I've rebuilt my dylibs with install_name_tool to point to: @executable_path/../Frameworks and in "build phase" of myApp's target I've added "copy files" phase with destination "Frameworks" for my dylibs. Where is the problem?

4

1 回答 1

0

检查您的应用程序包并确保复制到 Frameworks 中的文件是实际的 dylib 而不是符号链接文件。另外,您是否在 dylib 文件和可执行文件上都运行了 install_name_tool ?查看共享库的此页面以获取示例。

另请参阅此问题

于 2011-08-17T14:56:56.997 回答