Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compile Qt 5.3 for Windows XP with VS2012/2013 [SOLUTION!]
Forum Updated to NodeBB v4.3 + New Features

Compile Qt 5.3 for Windows XP with VS2012/2013 [SOLUTION!]

Scheduled Pinned Locked Moved General and Desktop
11 Posts 4 Posters 10.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    altera_2011
    wrote on last edited by
    #1

    I've struggled with this ever since we moved to VS2012 ( and now VS2013 ). Getting binaries that work for Windows XP with qmake was a pain and required editing sources left and right. But a commit that dropped about a month ago has finally taken the pain away!

    I ended up finding this commit because the mkspec for vs2013 has a new variable: QMAKE_SUBSYSTEM_SUFFIX, a quick search led me to the commit:

    https://qt.gitorious.org/qt/qtbase/commit/10a0ac759e26e27751ae96d02eb1e260ab371194

    Basically all that you need to do when compiling Qt is add -target xp to the configure command line.

    Thanks to Joerg for adding this feature!

    Edit: parameter -target xp

    1 Reply Last reply
    0
    • hskoglundH Offline
      hskoglundH Offline
      hskoglund
      wrote on last edited by
      #2

      So -platform xp will work in the upcoming Qt 5.3? If so, excellent news, I have to support Windows XP.

      Note: even with this, you still cannot use VS2012 RTM for XP deployment, you have to update it, best one is "Update 4":http://www.microsoft.com/en-us/download/details.aspx?id=39305 But VS2013 works out of the box :-)

      (Also I have to change my "blog post about Qt and XP":http://www.tripleboot.org/?p=423 )

      1 Reply Last reply
      0
      • A Offline
        A Offline
        altera_2011
        wrote on last edited by
        #3

        Good point on VS2012 update.

        I confirmed this with 5.3.0 RC. Qt built with -target xp will work on XP, and so will all executables built with said qmake.

        edit: fixed parameter.

        1 Reply Last reply
        0
        • hskoglundH Offline
          hskoglundH Offline
          hskoglund
          wrote on last edited by
          #4

          Nice! When using Qt 5.3, I see no reason not to include -platform xp in all projects (well maybe not if you're 100% positive it will not run on XP).
          After all, the MinGW compiler uses /SUBSYSTEM:WINDOWS,4 (not 5.0x, i.e. compatible for Windows NT4) for all projects.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            altera_2011
            wrote on last edited by
            #5

            I agree, at least for 32 bit builds. My 64 bit builds I am building without the xp parameter. I believe that might only exclude XP 64, which is not very common at all. I've been doing that for a while and have not heard any complains from my users. ( so far :D )

            1 Reply Last reply
            0
            • A Offline
              A Offline
              altera_2011
              wrote on last edited by
              #6

              Just noticed that I still need to define set CL=/D_USING_V110_SDK71_ for applications built with qmake.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                ab_it
                wrote on last edited by
                #7

                I belive it's "-target xp" as an option to target Windows XP, not "-platform xp".
                ICU libraries should be recompiled too.

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  altera_2011
                  wrote on last edited by
                  #8

                  ab_it, you are right. Fixed in first post.

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    burrbi
                    wrote on last edited by
                    #9

                    I just started testing Qt and installed the precompiled Qt 5.3.0 for Windows 32-bit (VS 2013, OpenGL, 616 MB) installer. Seems to work very nice so I decided to get deeper into it but I couldn't deploy my app for XP.

                    Did I get this right? I need to build Qt myself instead of using the prebuild one if I want to support WindowsXP?

                    1 Reply Last reply
                    0
                    • hskoglundH Offline
                      hskoglundH Offline
                      hskoglund
                      wrote on last edited by
                      #10

                      Hi, no it's not that bad, while it's correct that if (when using VS2012 and VS2013) you want to support XP "out of the box", you have to rebuild Qt; you can still, by a simple setting in Projects/Build Environment, deploy any Qt app to Windows XP.

                      Wrote a "blog post":http://www.tripleboot.org/?p=423 how to set it.

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        burrbi
                        wrote on last edited by
                        #11

                        [quote author="hskoglund" date="1401950279"]you can still, by a simple setting in Projects/Build Environment, deploy any Qt app to Windows XP.

                        Wrote a "blog post":http://www.tripleboot.org/?p=423 how to set it.
                        [/quote]

                        Thanks a lot, works like a charm. Stupid me already looked at that blog of yours - just didn't realized it's good for 2013 aswell.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved