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

Ninja fail when a .rc file is added to an executable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.4.2, 6.5.0 Beta1
    • Build System: CMake
    • Windows

    Description

      Adding a window resource file ".rc" using CMake command

      qt_add_executable(target main.cpp ${app_icon_resource_windows}) 

      containing the application icon specification, the build command generates the .exe with the desired icon. If I build the project another time ninja returns an error:

      ninja: error: FindFirstFileExA(//program files (x86)/windows kits/10/include/10.0.17763.0/um): Impossibile trovare il percorso di rete.
      // The latter in EN: Impossible to find network path

      Seems that the command{}

      FindFirstFileExA()

      wrong the path: "//program files ..." vs "c:/program files .."

      Removing the ".rc" file

      qt_add_executable(target main.cpp #[[${app_icon_resource_windows}]])

      the process completes successfully all the times.

      The bug can be checked using the Qt example "PhotoSurface".

      I attach also a really short example named "appicon".

      Building the application twice the bug occurs

      Attachments

        1. appicon-1.zip
          10 kB
        2. build-Debug.zip
          2.22 MB
        3. QTBUG-110445.mp4
          2.93 MB
        4. win_res.rc.res.d
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            lorenzoaldrighetti Lorenzo Aldrighetti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes