[Qt-interest] Including libltdl.3.dylib on OSX into deployable package

Samuel Gaist samuel.gaist at edeltech.ch
Wed Jan 4 11:42:19 CET 2012


On 4 janv. 2012, at 11:01, Dirk Neumann wrote:

> Hello!
> 
> I am writing an Qt-application for MacOSX, and I use macdeployqt to
> generate a deployable app-bundle. Now I have the problem that some
> external libraries I use (mpg123) point to /usr/lib/libltdl.3.dylib in
> app-bundle. On OSX 10.5 and 10.6 this works fine, but on 10.7 there is
> no /usr/lib/libltdl.3.dylib but /usr/lib/libltld.7.dylib. So I tried to
> incorporate the libltdl.3 from my devel-computer (OSX 10.5, Qt 4.5.3)
> with LIBS+= -L/usr/lib\
>       -lltdl
> in the .pro-file, regenerated all (make distclean, qmake, make) and
> reran macdeployqt. But there is still no libltdl.3.dylib in
> Frameworks-directory. 
> Copying libldtdl.3.dylib manually to the Frameworks-directory before
> running macdeployqt also has no positive effect: libs pointing still
> to /usr/lib/libltdl.3.dylib instead of Frameworks/libltdl.3.dylib.
> 
> I think I go into the wrong direction here, and I hope some one has
> time to look at my compass.
> 
> Greetings,
> 
> Dirk.
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest

Hello,

It happens that some libraries are not copied, so you have to do it manually (as you already do) then you must update the paths of your executable and/or local lib with install_name_tool

i.e: install_name_tool -change /usr/lib/libltdl.3.dylib @executable_path/../Frameworks/libltdl.3.dylib YourCoolApplication.app/Contents/MacOS/YourCoolApplication 

Do this on all necessary files BUT only for those that you provide in your bundle (i.e. no system libraries)

You might also be interested in using otool -L to have more information about your application/libraries.

Hope this helps
Samuel


More information about the Qt-interest-old mailing list