PDA

View Full Version : Building on OSX



sbauer
1st September 2009, 04:38
I've been developing my QT-based application on Windows without issues for a while now. This evening, I broke out the MacBook Pro to try and get it running on OSX. The project itself builds. However, when launching the app bundle, it fails to load my dyn library.

My project consists of one app project and one shared library project. The app project depends on the library.

I've looking up information online and noticed there are several articles related to otool, and several other utilities. What's the best way to include my custom dyn lib in my app bundle?

Thanks.

Boron
1st September 2009, 11:46
I am not familiar with MacOS X, but the easiest way is to place the shared library in the same directory as the executable.

sbauer
1st September 2009, 15:50
I am not familiar with MacOS X, but the easiest way is to place the shared library in the same directory as the executable.

That's what I'm doing on Windows and it's working fine. However, doing the same thing under OSX with an app bundle doesn't work. It appears that you have to place the lib in the app bundle under frameworks. You then have to adjust it so that the app looks for the lib in the app bundle, and not in a system directory somewhere. I'm just wondering how others are doing this. Do they have a custom step in their build? I'm using Qt Creator at the moment.

anteropedras
2nd September 2009, 19:45
http://labs.trolltech.com/blogs/2007/08/23/deploying-mac-applications-without-the-hassle/

use deployqt it will copy the libs to the app bundle ...

you can also do by hand , you can open the application bundle with finder can't remember the right name now of the menu. and copy the libs to the bundle.

NicholasSmith
4th September 2009, 14:08
It's the 'View Package Contents.." menu option, but it's probably better to use the deployqt tool really.