views:

361

answers:

2

How to deploy Qt+Boost Application on Mac OS X or Windows platform.

I use Qt Creator + Qt 4.6 + MacOS 10.6

How to compile my application into release to run it on another computer w/o installed Qt libraries?

+1  A: 

For Qt, refer to the docs on deployment (Windows, Mac). Keep in mind that Qt is quite big - if you decide to link statically consider building a version of Qt that only contains the modules you need.

Most boost libraries are header only and thus need no deployment. For those that are not (thread, ...) refer to the respective documentation on building and deploy them like any other library.

Georg Fritzsche
Sorry, but I know about this docs, but I don't understand anything.I try to do all from those docs, but I can't run my application on another computer.
Alex Snet
Then help us understand where exactly your problem is.
Georg Fritzsche
I need step by step instruction how to build release from source code.For Mac and Win.If you can help me - this was great!
Alex Snet
It doesn't make much sense to repeat the already existing step-by-step guides... why not try them and tell us where you get stuck?
Georg Fritzsche
+1  A: 

I ship Windows apps built with Qt and I use the Dependency Walker tool to first determine which Qt and MinGW DLLs are required. For Qt 4.6 apps you'll need to always ship the mingwm10.dll and libgcc_s_dw2-1.dll files found in your Qt bin folder (default location of this will be C:\Qt\2009.05\qt\bin).

Depending on which Qt modules you use will determine which Qt DLLs are shipped - you'll always need to ship QtCore4.dll. If you use networking then you'll need QtNetwork4.dll and so on - Dependency Walker will show you.

Note that you should only ship Qt files found in C:\Qt\2009.05\qt\bin and NOT those in C:\Qt\2009.05\bin - the latter folder contains MSVC built Qt DLLs used by Qt Creator and other tools and, assuming you're building using MinGW, these will not work with your app.)

I install these files in the application folder, which isn't ideal if you have multiple products that use Qt. If you are using the same version of Qt for all your projects then you could install the Qt files into a special folder that is then added to the user's PATH. YMMV and this is a big topic in itself.

Rob
If multiple products use the same libs, another approach on windows is to install those into *YourProgramFilesFolder\YourCompany* and have a common *Libraries* folder in there.
Georg Fritzsche