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. qmake + MSBuild: "specified dependency moc_predefs.h.cbt does not exist" and incremental build problems
Forum Updated to NodeBB v4.3 + New Features

qmake + MSBuild: "specified dependency moc_predefs.h.cbt does not exist" and incremental build problems

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 770 Views 1 Watching
  • 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.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on last edited by Violet Giraffe
    #1

    I have a qmake SUBDIRS project, with some customizations but not a complicated one. I generate a Visual Studio project with qmake -tp vc -r and open it in VS 2022.

    Usually it works fine, but today I'm having an issue that some parts of some sub-projects are being rebuilt every time I click "Build". The usual troubleshooting steps of deleting all the output folders and the .vs folder didn't help. There are messages like this in the build log:

    1>Generate moc_predefs.h
    1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): warning MSB8064: Custom build for item "..\build\protect\x64-release\moc_predefs.h.cbt" succeeded, but specified dependency "e:\development\projects\my_project\build\lib1\x64-release\moc_predefs.h.cbt" does not exist. This may cause incremental build to work incorrectly.
    

    Does anyone know what causes it / how to solve? In the past I would sometimes get this but it went away quickly, maybe after cleaning all the build output folders. Now I can't make it go away.
    P. S. Qt 6.6.2 msvc2019_64

    C 1 Reply Last reply
    1
    • V Violet Giraffe

      I have a qmake SUBDIRS project, with some customizations but not a complicated one. I generate a Visual Studio project with qmake -tp vc -r and open it in VS 2022.

      Usually it works fine, but today I'm having an issue that some parts of some sub-projects are being rebuilt every time I click "Build". The usual troubleshooting steps of deleting all the output folders and the .vs folder didn't help. There are messages like this in the build log:

      1>Generate moc_predefs.h
      1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): warning MSB8064: Custom build for item "..\build\protect\x64-release\moc_predefs.h.cbt" succeeded, but specified dependency "e:\development\projects\my_project\build\lib1\x64-release\moc_predefs.h.cbt" does not exist. This may cause incremental build to work incorrectly.
      

      Does anyone know what causes it / how to solve? In the past I would sometimes get this but it went away quickly, maybe after cleaning all the build output folders. Now I can't make it go away.
      P. S. Qt 6.6.2 msvc2019_64

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @Violet-Giraffe What is this predefs.h file? A pre-compiled header that does not exist yet perhaps?

      V 1 Reply Last reply
      0
      • C ChrisW67

        @Violet-Giraffe What is this predefs.h file? A pre-compiled header that does not exist yet perhaps?

        V Offline
        V Offline
        Violet Giraffe
        wrote on last edited by Violet Giraffe
        #3

        @ChrisW67
        I have no idea! It is generated by qmake and there is nothing like that in my .pro files. It's some internal qmake thing. The project does not use PCH.

        1 Reply Last reply
        1

        • Login

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