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

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

      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)/

        For Gerrit Dashboard: QTVSADDINBUG-611
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes