Getting error while using TagLib framework in mac application

Thilo Cestonaro thilo at cestona.ro
Thu Feb 18 00:01:14 CET 2010


Hey,

> ----------------------  Error -------------------------
> dyld: Library not loaded: /TagLib.framework/Versions/1/TagLib
>  Referenced from: /Users/reubro/Desktop/A-Cocoa/Cocoa
> Practics/SongList/SongList/build/Debug/SongList.app/Contents/MacOS/SongList
>   Reason: image not found
>
> The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited
> due to signal 5 (SIGTRAP).
> -------------------------

I had the very same problem and it looks like the id in the TagLib framework binary isn't set correctly.
Try this command to change the framework install id in the framework itself:
install_name_tool -id "@executable_path/../Frameworks/TagLib.framework/Versions/1/TagLib" /Library/Frameworks/TagLib.framework/Versions/1/TagLib

This will set the "search" path of the Library to a path which is relative to the binary in the .app folder of your app.
So when your app is called MyApp.app then the @executable_path is MyApp.app/Contents/MacOs/MyApp. 
After using the above command, MyApp will search the TagLib in MyApp.app/Contents/Frameworks/TagLib.framework/Versions/1/TagLib
When you are that far, you can add a new copy build phase to the destination "Frameworks" and drag&drop the TagLib.Framework from the middle window of XCode to this copy phase.

It works here, so far.

ciao Ephraim


More information about the taglib-devel mailing list