qt-interest@trolltech.com
[Top] [All Lists]

Re: OS X Deployment - Frameworks

Subject: Re: OS X Deployment - Frameworks
From: "Willy P"
Date: Thu, 9 Aug 2007 14:41:49 -0700
Also here is the result of my otool:  It seems that no matter what I
do with the install_name_tool the results of otool are always the
same.  Not sure if that's good or bad.

otool -L myApp.app/Contents/MacOS/myApp
myApp.app/Contents/MacOS/myApp:
        QtGui.framework/Versions/4/QtGui (compatibility version 4.2.0,
current version 4.2.2)
        /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 128.0.0)
        /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 240.0.0)
        /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
(compatibility version 45.0.0, current version 824.42.0)
        QtCore.framework/Versions/4/QtCore (compatibility version
4.2.0, current version 4.2.2)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current
version 1.2.3)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.9)
        /usr/lib/libiconv.2.dylib (compatibility version 5.0.0,
current version 5.0.0)
        
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
(compatibility version 1.0.0, current version 22.0.0)
        /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)

On 8/9/07, Willy P <willy.lists@xxxxxxxxx> wrote:
> pelle$ myApp.app/Contents/MacOS/myApp
>
> dyld: Library not loaded: QtGui.framework/Versions/4/QtGui
>   Referenced from: /Users/pelle/myApp/myApp.app/Contents/MacOS/myApp
>   Reason: image not found
> Trace/BPT trap
>
>
> On 8/9/07, Kamil Klimek <naresh@xxxxxxx> wrote:
> > Please run your application from terminal like this:
> >
> > cd ~/myApp
> > ./myApp.app/Contents/MacOS/myApp
> >
> > There "should" be some usefull output.
> >
> >
> > On Aug 9, 2007, at 10:25 AM, Willy P wrote:
> >
> > > Hey,
> > > I am trying to deploy a dynamically linked app on OS X.  I have read
> > > the docs < http://doc.trolltech.com/4.2/deployment-mac.html > multiple
> > > times and have created the simplest possible case and it doesn't work.
> > >  I am going to be extra explicit b/c I have followed the directions
> > > multiple times and I must be misinterpreting them or not making some
> > > assumption that they are making.
> > >
> > > Here goes:
> > >
> > > cd ~
> > > mkdir myApp
> > > cd myApp
> > > touch main.cpp
> > >
> > > main.cpp looks like this:
> > >
> > > #include <QApplication>
> > > #include <QtGui>
> > >
> > > int main( int argc, char** argv )
> > > {
> > >         QApplication app( argc, argv );
> > >         QLabel label( "Hello Qt" );
> > >         label.show();
> > >         return app.exec();
> > > }
> > >
> > > qmake -project
> > > qmake -spec macx-g++ -config release
> > > make
> > >
> > > ## my app works fine ##
> > >
> > > mkdir myApp.app/Contents/Frameworks
> > > cp -R /Library/Frameworks/QtCore.framework myApp.app/Contents/
> > > Frameworks
> > > cp -R /Library/Frameworks/QtGui.framework myApp.app/Contents/
> > > Frameworks
> > >
> > > #install_name_tool fun
> > >
> > > install_name_tool -id
> > > @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
> > > myApp.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore
> > >
> > > install_name_tool -id
> > > @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
> > > myApp.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtGui
> > >
> > > install_name_tool -change
> > > /Library/Frameworks/QtCore.framework/Versions/4.0/QtCore
> > > @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
> > > myApp.app/Contents/MacOS/myApp
> > >
> > > install_name_tool -change
> > > /Library/Frameworks/QtGui.framework/Versions/4.0/QtGui
> > > @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui
> > > myApp.app/Contents/MacOS/myApp
> > >
> > > install_name_tool -change
> > > /Library/Frameworks/QtCore.framework/Versions/4.0/QtCore
> > > @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
> > > myApp.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui
> > >
> > > cd /Library/Frameworks
> > > mkdir hide
> > > copy all the Qt frameworks into the "hide" directory so myApp.app has
> > >
> > > Run myApp.app.
> > >
> > > It opens and closes quickly.
> > >
> > > I don't know what's going wrong and I don't even know how to tell
> > > what's going wrong.
> > >
> > > Help me qt user list.  You're my only hope.
> > >
> > > Thanks in advance...
> > >
> > > -Willy
> > >
> > > --
> > > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> > > with "unsubscribe" in the subject or the body.
> > > List archive and information: http://lists.trolltech.com/qt-interest/
> > >
> >
> > --
> > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
> > "unsubscribe" in the subject or the body.
> > List archive and information: http://lists.trolltech.com/qt-interest/
> >
> >
>

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>