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

Qmake .vcxproj generator wrong behaviour if multiple MSVC versions installed.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.2.1
    • 5.2.0 RC1, Some future release
    • Build tools: qmake
    • Windows 7 x64/ MSVC 2010, MSVC2013 Installed.
    • 46b397d67f4f5e623364d73648478de623381b01

    Description

      I have VC2010 and VC2013 installed. I know that VC2013 isn't supported in 5.2.0, but the exactly same thing would happen with 2012 MSVC.

      If I run qmake from VC2013 command prompt or specifying spec manually the project is generated and debug configuartion works fine, but if I switch to release, things are becoming very wrong - project isn't even opening correctly and showing some errors. The actual cause of this is that qmake isn't writing toolset version for release, so it's being treated like part of VC2010 project.

      I actually looked through vcproj generator source code, and found the cause of the problem. In function DotNET which_dotnet_version() there's line:

       
      return dotNetCombo[i].version;
      

      which is being executed exactly in multiple VC versions case, but the function actually should store found version in current_version static variable because it returns it as a result on every next call, but in this case version stored in current_version is equal to first found (or maybe minimal, I'm not sure) of VC on system which is 2010. So basically while qmake is writing output for first configuration version is correct, but while it is writing stuff about release configuration, .NET version is wrong and it leads to messed up project.

      The obvious fix would be:

       
      {
        current_version = dotNetCombo[i].version;
        return current_version;
      }
      

      But it's up to you how to fix it, I think it's pretty much important, because it breaks things in not very understandable fashion))

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            predelnik Sergey Semushin
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes