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

Build with Qt Quick Compiler fail managing directory for temporary items

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 2.3.2
    • 2.3.1
    • Build-time integration
    • None
    • Visual Studio Version: 2017 Professional 15.9.4
      Qt version: 5.11.0
      Integration Type: Qt/MSBuild
    • Windows
    • c182b06ae34e91838261e391f5f1d3daa2d9293e

    Description

      I have a project with qml files in a qrc file
      I don't use GeneratedFiles for the temporary qt files but we use a temp folder where we put all the temporary files,
      My folder layout is
      root

      • src (source files
      • qml (qml files)
      • temp (Configuration independent temp files)
      • temp/GeneratedFiles (Configuration independent qt generated files)
      • temp$(Platform)-$(Configuration) (Configuration specific temp files)
      • temp$(Platform)-$(Configuration)/GeneratedFiles (Configuration specific qt generated files)

      I tried to enable Qt Quick Compiler but it immediately failed because the default is to use the GeneratedFiles folder but it was missing and the tools was not creating it.

      So i changed the path used in all the Qt Quick Compiler settings from
      $(ProjectDir)GeneratedFiles****
      to
      $(ProjectDir)temp\GeneratedFiles****

      After this change visual studio created all the ComponentName_qml.cpp fils in $(ProjectDir)temp\GeneratedFiles

      But now the process is failing during the build of the ComponentName_qml.cpp file with the following error message

      1>C:\MyProject\temp\GeneratedFiles\ComponentName_qml.cpp : fatal error C1083: Cannot open compiler generated file: 'C:\MyProject\temp\x64-Release\C:\MyProject\temp\GeneratedFiles\ComponentName_qml.obj': Invalid argument

      Some interesting project settings are

      IntDir = temp\$(Platform)-$(Configuration)\
      QtQuickCompiler.CacheFile = $(ProjectDir)temp\GeneratedFiles%<Filename>_%<Suffix>.cpp
      C++.ObjectFileName = $(IntDir)/%(RelativeDir)/

      Attachments

        Issue Links

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

          Activity

            People

              mecfc Miguel Costa
              pscamodio-87 Amodio Pesce
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes