Results 1 to 6 of 6

Thread: How can i compile my app with all libraries to run in win7

  1. #1
    Join Date
    Mar 2009
    Posts
    28
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default How can i compile my app with all libraries to run in win7

    Hi, i develop some application in past but i allways have a problem with Qt libraries. When I want just run my app, i must copy some qt library to Windows\system32. Can I compile the app with all needed ? And the size, how much more will be larger?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How can i compile my app with all libraries to run in win7

    Build a static Qt and static versions of any other libs you use, and build your application with that: see Deploying Qt Applications. The executable may be the as large as the original executable and all the associated dynamic libraries and plugins... it depends on what you use. If you are using the LGPL Qt, or any LGPL component of the commercial Qt, then your static executable will have requirements regarding relinking imposed by the licence. Other libs may impose other restrictions.

    IMHO it is far easier to write an installer that puts the needed Qt libs in the same directory as the executable (not system32).
    Last edited by ChrisW67; 18th January 2012 at 06:30.

  3. #3
    Join Date
    Mar 2009
    Posts
    28
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i compile my app with all libraries to run in win7

    Build a static Qt, and build your application with that.
    Maybe it's clear information. But I really don't know what you mean. Can you give me some more information?

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How can i compile my app with all libraries to run in win7


  5. The following user says thank you to ChrisW67 for this useful post:

    Lodhart (18th January 2012)

  6. #5
    Join Date
    Mar 2009
    Posts
    28
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i compile my app with all libraries to run in win7

    Thank you a lot for quick reply.

  7. #6
    Join Date
    Mar 2009
    Posts
    28
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can i compile my app with all libraries to run in win7

    Ok, I try build the newest version of Qt but with no success. Allways i have got some errors. Finally I found this tutorial: http://blog.bakojohn.com/?p=205&lang=en
    And it works only with the same version(4.6.2). I don't know why but it never mind.
    There is another BUT: When i build my app in release mode. It works fine. But when a try debug mode. I have got error: "Cannot open -lqtguid". From what I found on Google I understand that is the same library as Qtgui but Qtgui is for release mode and Qtguid is for debug mode.
    My guess is: it's because in configure line missing "-debug" switch: "configure -static -release -no-exceptions -qt-sql-sqlite". Is that true?

    And in real life. I just develop my app in debug mode with shared libraries and when I want to build my app as standalone, I use release-static mode to build.

    Am I understand it well?

Similar Threads

  1. Replies: 4
    Last Post: 5th November 2011, 01:38
  2. Problem in reading xml in win7
    By athulms in forum Newbie
    Replies: 3
    Last Post: 14th October 2011, 10:00
  3. How to compile xmlrpc++ libraries from a makefile
    By Andrea Landi in forum General Programming
    Replies: 13
    Last Post: 20th May 2011, 08:31
  4. LibQxt won't build with Qt 4.7.0 on Win7
    By qratman in forum Installation and Deployment
    Replies: 1
    Last Post: 14th October 2010, 14:09
  5. Compile and install only the libraries
    By SteM in forum Installation and Deployment
    Replies: 3
    Last Post: 6th August 2007, 20:39

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.