Results 1 to 11 of 11

Thread: making a portable binary on windows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2006
    Location
    South Carolina, USA
    Posts
    34
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 4 Times in 4 Posts

    Default Re: making a portable binary on windows

    When you compile a program with Qt and basically any compiler your program will be dependent on some dlls provided by Qt and the compiler.

    For example if you compile a very basic Qt Application that only has a main window and pop up screen with mingw32-gcc-3.4.2 and Qt 4.x.x you would need to distribute the following dlls with your application for it to work on another computer.

    I think this is all of them you would need. You might also need another microsoft dll as well. It has been a while since I compiled a program for another comptuer with mingw. But this should give you the basic idea.

    mingwm10.dll
    QtCore4.dll
    QtGui4.dll

    For example if I compile with Visual Studio 2005 instead of mingw I might need to distrubute msvcp80.dll with my application instead of mingwm10.dll.

    You can use depends.exe to see all of the DLLs your program needs to run. The program can be found here: http://www.dependencywalker.com/

    Note that it will show a large list. Most of the DLLs will already be on the target system as they are a part of windows. You will simply need to look for the Qt DLLs and the mingwm10 one. If you forget one when you try running the program on a target machine it should tell you which DLL it can not find.

    Also if you never plan on having any kind of plugins or anything for your program you can rebuild Qt in static mode. This will compile everything into the executable (Qt speaking). You will still need to include the DLL from your compiler, however, you will not need to distribute the Qt DLLs as well.

    I hope this helps you.

  2. The following user says thank you to michael for this useful post:

    patcito (25th May 2006)

Similar Threads

  1. Qt and windows vista
    By munna in forum General Discussion
    Replies: 8
    Last Post: 11th January 2006, 23:33

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.