Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Strange compilation error of resource file with Qt 6.1.1 RC
Qt 6.11 is out! See what's new in the release blog

Strange compilation error of resource file with Qt 6.1.1 RC

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 465 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DerReisende
    wrote on last edited by
    #1

    I have written a c++20 msvc cmake project initially based on Qt 6.0 on windows.
    Everything worked fine for the upgrade to Qt 6.1 and the project happily compiles (besides fixing a qproperty.h bug in 6.1).
    Today I downloaded the 6.1.1 Preview with maintenance tool to recompile the app. Had to locally fix qproperty.h bug here as well.

    Now I do get this very strange error:

    CMakeFiles\OrgElemTreeView.dir\orgelemtreeview.rc.res C:\Users\aea_t\Documents\development\Qt-Projekte\OrgElemTreeViewer\orgelemtreeview.rc
    clang: error: no such file or directory: '/P'
    clang: error: no such file or directory: '/DRC_INVOKED'
    clang: error: no such file or directory: '/TC'
    clang: error: no such file or directory: '/nologo'
    clang: error: no such file or directory: '/showIncludes'
    clang: error: no such file or directory: '/out:CMakeFiles\OrgElemTreeView.dir\orgelemtreeview.rc.res.dep.obj'
    ninja: build stopped: subcommand failed.
    

    This is really strange to me as it worked with previous Qt6 versions and the resource file integration in cmake is based on this document:

    IF(WIN32)
      set(app_icon_resource_windows "${CMAKE_SOURCE_DIR}/orgelemtreeview.rc")
    ENDIF(WIN32)
    
    qt_add_executable(${CMAKE_PROJECT_NAME}
        ${SOURCES}
        ${app_icon_resource_windows}
        )
    

    clang ist not installed with my MSVC installation and as I said it worked before.

    Maybe someone has a hint for me?

    Thx,

    Christian

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DerReisende
      wrote on last edited by
      #2

      Okay I finally got it to build. It seems to be caused by Qt Creator setting the C compiler in the options to clang:
      2021-06-03 (1).png

      After overriding CMAKE_C_COMPILER manually in the Projects tab I do get a successful build.

      Still I don't know why I cannot change the compiler in the 6.1.1 kit, which is possible for the 6.1.0 kit.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved