8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

dyld: Library not loaded

Last updated at Posted at 2012-02-12

Macでappを配布するとき、このエラーが出てちょっと困ったのでメモ。
結論から言えば、動的リンクライブラリが絶対パスで指定されていたのが原因だった。

otool -L binfile

で依存関係を調べて

install_name_tool -change old_path new_path binfile

でそのパスを変更できる。

install_name_tool -change /System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL @executable_path/../Frameworks/OpenAL.framework/Versions/A/OpenAL Birth

Macの場合は@executable_pathというキーワードが、実行ファイルの含まれるディレクトリに置換されるらしい。

8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?