Results 1 to 4 of 4

Thread: Build static QT 5.1.0 on Windows x64 with Visual Studio 2012

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,316
    Thanks
    315
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Build static QT 5.1.0 on Windows x64 with Visual Studio 2012

    But you will also have to make sure that you turn off all the compile and link flags that would otherwise tell VC++ that you are using a DLL build. Things like QT_DLL and the like. Otherwise, it will import Qt assuming DLL linkage, and you will get a completely different set of "mangled" names (and a zillion link errors for all those "undefined" symbols).

    The Visual Studio plugin is not required at all to do this, but it helps. You can build Qt apps in Visual Studio without it, so long as you specify the right compile options and libraries. The Qt plugin makes it easier, but only if you are following the standard method of making apps. Static builds are not standard.

    By the way, if you are using Qt open source in a commercial application, it is a violation of the LGPL license to link statically. You must buy a Qt Commercial license if you want to build a statically-linked commercial Qt app.
    Last edited by d_stranz; 17th August 2013 at 05:51.

Similar Threads

  1. Qt 5.1.1 not recognized by Visual Studio Add-in 2012
    By cdarwin in forum Qt Programming
    Replies: 0
    Last Post: 5th June 2013, 12:05
  2. Qt 5.0.1 + Visual Studio 2012 + OpenGL Error
    By Rayven in forum Qt Programming
    Replies: 2
    Last Post: 24th April 2013, 18:34
  3. Help regarding QT plugins for Visual studio 2012
    By shah_27 in forum Qt Programming
    Replies: 0
    Last Post: 9th January 2013, 09:42
  4. Build qt 5 with Visual Studio 2012
    By Edder in forum Installation and Deployment
    Replies: 4
    Last Post: 28th December 2012, 10:16
  5. [Solved] static build probs (Visual Studio.Net 2003)
    By darksaga in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd September 2007, 17:46

Tags for this Thread

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.