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?

double-beep
  • 5,031
  • 17
  • 33
  • 41
Mariano
  • 330
  • 1
  • 4
  • 13

1 Answers1

0

Check your application bundle and make sure the file that got copied into Frameworks is the actual dylib and not a symbolic link file. Also, did you run install_name_tool on both the dylib file and your executable? Look at this page under Shared Libraries for an example.

Also see this question.

Community
  • 1
  • 1
SSteve
  • 10,550
  • 5
  • 46
  • 72