Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-28332

Unable to build Qt 5 with MS Visual Studio 2012 XP-Target

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0 RC 2
    • 4.8.4, 5.0.0 Beta 2
    • Build tools: qmake
    • None
    • Windows 8 Pro, MSVC 2012 Update 1

    Description

      The recently updated MSVC2012 now supports building of Windowx XP compatible software.
      This so called "XP Target" build feature of MSVC2012 relies on a ancient and rarely used mechanism: The environment variables CL and LINK. In the Microsoft Build environment, these variables are used as primary arguments for cl.exe and link.exe and they are prepended to the arguments of the command line or Makefile. (example: "cl.exe <my args>" is executed as "cl.exe $(CL) <my args>" if CL is not empty)

      Microsoft mixes up the environment variables and the makefile variables, so there is a variable corruption once the build script contains variables namend LINK or CL

      Unfortunately Microsoft has not documented this feature very prominent, but we have to care for it.
      Qt violates this microsoft feature for long, but since people does not often use this variables CL and LINK, cl.exe and link.exe ignored the empty variables.

      But now, for the "XP Target" function of MSVC 2012 the usage of the two variables is not longer optional but mandatory and the error raises.

      Not fixing this error means that MSVC 2012 is unuble to build Qt for XP-compatible software.

      The appended files are correted so QMake generates Makefiles containing LINKER_BIN instead of LINK:
      \qmake\Makefile.win32
      \qmake\generators\win32\msvc_nmake.cpp
      \qmake\generators\win32\winmakefile.cpp

      Attachments

        1. Makefile.win32
          6 kB
        2. Makefile.win32.patch
          0.3 kB
        3. msvc_nmake.cpp
          15 kB
        4. msvc_nmake.cpp.patch
          0.2 kB
        5. winmakefile.cpp
          39 kB
        6. winmakefile.cpp.patch
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            torben@dannhauer.info Torben Dannhauer
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes