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. .moc file not found
Qt 6.11 is out! See what's new in the release blog

.moc file not found

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 3 Posters 613 Views 2 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
    Videas
    wrote on last edited by Axel Spoerl
    #1

    Hi! I am having some issue with building my project. I used to work with this 5 months ago and it works well. However, I just start continueing with it by now with my new PC, re-setup everything. And this issue happens. I didnt change anything in this project last 5 months. Can anyone know what is the issue?

    27c21b22-d24c-4209-aa75-e254affcde71-image.png

    This is the cmake file:

    qt_add_library(CalibratedColorizedVideo STATIC)
    
    find_package(Qt6 6.8 REQUIRED COMPONENTS Core Quick Multimedia MultimediaQuickPrivate ShaderTools)
    
    qt_add_qml_module(CalibratedColorizedVideo
        URI CalibratedColorizedVideo
        SOURCES calibratedcolorizedvideooutput.h calibratedcolorizedvideooutput.cpp
        SOURCES calibrationnode.h calibrationnode.cpp
        RESOURCES pixelwisequadraticcalibrate.vert pixelwisequadraticcalibrate.frag
        SOURCES colorizationnode.h colorizationnode.cpp
        RESOURCES piecewisecolorize.vert piecewisecolorize.frag
        SOURCES dynamicr32ftexture.h dynamicr32ftexture.cpp
    )
    
    qt6_add_shaders(CalibratedColorizedVideo "shaders"
        BATCHABLE
        PREFIX
            "/calibratedcolorizedvideo"
        FILES
            "pixelwisequadraticcalibrate.vert"
            "pixelwisequadraticcalibrate.frag"
            "piecewisecolorize.vert"
            "piecewisecolorize.frag"
    )
    
    target_link_libraries(CalibratedColorizedVideo PRIVATE
        Qt6::Core
        Qt6::GuiPrivate
        Qt6::Quick
        Qt6::Multimedia
        Qt6::MultimediaQuickPrivate
    )
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      While you didn't change you code, you changed your setup.
      What is the versions of the tools you have now VS the one from 5 months ago ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      V 2 Replies Last reply
      0
      • Axel SpoerlA Offline
        Axel SpoerlA Offline
        Axel Spoerl
        Moderators
        wrote on last edited by
        #3

        Hi,

        please format your code with the </> code formatting tags.
        My guess is that your build directory is still populated with a legacy build from a previous compiler version.
        That may cause all kinds of unexpected problems.
        Try a clean new build.

        Software Engineer
        The Qt Company, Oslo

        V 1 Reply Last reply
        1
        • Axel SpoerlA Axel Spoerl

          Hi,

          please format your code with the </> code formatting tags.
          My guess is that your build directory is still populated with a legacy build from a previous compiler version.
          That may cause all kinds of unexpected problems.
          Try a clean new build.

          V Offline
          V Offline
          Videas
          wrote on last edited by
          #4

          @Axel-Spoerl I will format it next time, it didnt allow me to edit the topic anymore now.

          I delete and rebuild the project many time but it still didn't work

          SGaistS 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            While you didn't change you code, you changed your setup.
            What is the versions of the tools you have now VS the one from 5 months ago ?

            V Offline
            V Offline
            Videas
            wrote on last edited by
            #5

            @SGaist I set up almost everything with the newest version. QT: 6.8.6 vs QT 6.8.3; QT Creator 18.0 vs QT Creator 17.0. I roll back them to the older version but it still stay the same issue.

            1 Reply Last reply
            0
            • SGaistS SGaist

              Hi,

              While you didn't change you code, you changed your setup.
              What is the versions of the tools you have now VS the one from 5 months ago ?

              V Offline
              V Offline
              Videas
              wrote on last edited by
              #6

              @SGaist Is there any other solution I can try instead of install evething original version that you can suggest?

              1 Reply Last reply
              0
              • V Videas

                @Axel-Spoerl I will format it next time, it didnt allow me to edit the topic anymore now.

                I delete and rebuild the project many time but it still didn't work

                SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Videas said in .moc file not found:

                @Axel-Spoerl I will format it next time, it didnt allow me to edit the topic anymore now.

                I delete and rebuild the project many time but it still didn't work

                What do you mean by delete ?
                Did you completely nuke the build folder and not just its content ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                V 1 Reply Last reply
                0
                • SGaistS SGaist

                  @Videas said in .moc file not found:

                  @Axel-Spoerl I will format it next time, it didnt allow me to edit the topic anymore now.

                  I delete and rebuild the project many time but it still didn't work

                  What do you mean by delete ?
                  Did you completely nuke the build folder and not just its content ?

                  V Offline
                  V Offline
                  Videas
                  wrote on last edited by
                  #8

                  @SGaist yes. I clean configuration, delete build folder and config cmake file, build the project again

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    Videas
                    wrote on last edited by
                    #9

                    I fixed the issue but still doesnt know exactly what is the solution. I play around with it, change compilers, change set up,... and the issue become different and then the issue finally solve it is by changing the code.

                    1 Reply Last reply
                    0
                    • V Videas has marked this topic as solved on

                    • Login

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