Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-439

Visual Studio Addin creates bad project file if "flat" flag is removed from config before converting to Visual Studio project

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.2.0
    • Component/s: General
    • Environment:
      Windows
    • Commits:
      e4c56d0753e88a0b5ce0c576fb4856c4b82225c3

      Description

      When removing the "flat" flag (CONFIG -= flat), opening a qt pro file generates bad Visual Studio project file.

      Following warning is shown to user:
      C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(942,5): warning MSB8027: Two or more files with the name of qrc_qml.cpp will produce outputs to the same location. This can lead to an incorrect build result. The files involved are GeneratedFiles\qrc_qml.cpp, debug\qrc_qml.cpp.

      And the build stops to a following error:
      c1xx : fatal error C1083: Cannot open source file: 'debug\qrc_qml.cpp': No such file or directory

      Steps to reproduce:

      • Create empty Qt Quick Application project
      • Add "CONFIG -= flat" to the project file
      • Open the project file through Visual Studio Addin -> Open Qt Project file
      • Start building
      • EXPECTED: Build succeeds without warnings
      • ACTUAL: Previous warning is shown, and build does not complete because of the previous error message

      Observing the Solution Explorer shows that the qml_qrc.cpp file is included twice in the project. Attached a screenshot of this situation.

        Attachments

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

          Activity

            People

            • Assignee:
              mecfc Miguel Costa
              Reporter:
              jussi_witick Jussi Witick
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes