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. error in generate automoc.cpp file???
Forum Updated to NodeBB v4.3 + New Features

error in generate automoc.cpp file???

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 3 Posters 667 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.
  • C Offline
    C Offline
    cerr
    wrote on 14 Aug 2019, 04:39 last edited by cerr
    #1

    Hi,

    make gives me an error in the by cmake autogenerated _automo.cpp file:
    In particular, make tells me:

    In file included from /home/ron/src/scaper/build/scaper_automoc.cpp
    /home/ron/src/scaper/build/moc_dialog.cpp:21:8: error: redefinition of ‘struct qt_meta_stringdata_ScaperDialog_t’ 
    struct qt_meta_stringdata_ScaperDialog_t {
    

    I'm not sure how I can resolve this... anyone...?
    Thank you!

    1 Reply Last reply
    0
    • C Online
      C Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 14 Aug 2019, 05:34 last edited by
      #2

      Do you include the moc file somewhere in your sources? If so please remove it and try again.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      C 1 Reply Last reply 14 Aug 2019, 14:42
      1
      • C Christian Ehrlicher
        14 Aug 2019, 05:34

        Do you include the moc file somewhere in your sources? If so please remove it and try again.

        C Offline
        C Offline
        cerr
        wrote on 14 Aug 2019, 14:42 last edited by
        #3

        @christian-ehrlicher said in error in generate automoc.cpp file???:

        Do you include the moc file somewhere in your sources? If so please remove it and try again.
        No I atually don't, a quick grep in my source dir only returned:

        ron@regDesktopHome:~/src/scaper$ grep -rn "moc" * | grep -v cmake | grep -vi make                                                                                                                                                                             
        build/moc_scacfg.cpp:15:#error "This file was generated using the moc from 5.5.1. It"                                                                                                                                                                         
        build/moc_scacfg.cpp:17:#error "(The moc has changed too much.)"                                                                                                                                                                                              
        build/scaper_automoc.cpp:2:#include "moc_dialog.cpp"                                                                                                                                                                                                          
        build/scaper_automoc.cpp:3:#include "moc_dialog.cpp"                                                                                                                                                                                                          
        build/scaper_automoc.cpp:4:#include "moc_scacfg.cpp"                                                                                                                                                                                                          
        build/moc_dialog.cpp:15:#error "This file was generated using the moc from 5.5.1. It"                                                                                                                                                                         
        build/moc_dialog.cpp:17:#error "(The moc has changed too much.)"                                                                                                                                                                                              
        llvm-project/libcxx/utils/google-benchmark/test/benchmark_gtest.cc:4:#include "gmock/gmock.h"   
        

        Whjat is expected - I assume. I'm a relative Qt newbie if it isn't obvious yet....
        If you would like to have a look at my sources, git clone https://github.com/stdcerr/scaper.git

        A 1 Reply Last reply 14 Aug 2019, 16:50
        0
        • C cerr
          14 Aug 2019, 14:42

          @christian-ehrlicher said in error in generate automoc.cpp file???:

          Do you include the moc file somewhere in your sources? If so please remove it and try again.
          No I atually don't, a quick grep in my source dir only returned:

          ron@regDesktopHome:~/src/scaper$ grep -rn "moc" * | grep -v cmake | grep -vi make                                                                                                                                                                             
          build/moc_scacfg.cpp:15:#error "This file was generated using the moc from 5.5.1. It"                                                                                                                                                                         
          build/moc_scacfg.cpp:17:#error "(The moc has changed too much.)"                                                                                                                                                                                              
          build/scaper_automoc.cpp:2:#include "moc_dialog.cpp"                                                                                                                                                                                                          
          build/scaper_automoc.cpp:3:#include "moc_dialog.cpp"                                                                                                                                                                                                          
          build/scaper_automoc.cpp:4:#include "moc_scacfg.cpp"                                                                                                                                                                                                          
          build/moc_dialog.cpp:15:#error "This file was generated using the moc from 5.5.1. It"                                                                                                                                                                         
          build/moc_dialog.cpp:17:#error "(The moc has changed too much.)"                                                                                                                                                                                              
          llvm-project/libcxx/utils/google-benchmark/test/benchmark_gtest.cc:4:#include "gmock/gmock.h"   
          

          Whjat is expected - I assume. I'm a relative Qt newbie if it isn't obvious yet....
          If you would like to have a look at my sources, git clone https://github.com/stdcerr/scaper.git

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 14 Aug 2019, 16:50 last edited by
          #4

          @cerr wipe the complete build directory and try again.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          2
          • C Online
            C Online
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on 14 Aug 2019, 17:42 last edited by
            #5

            Your headers are twice in your repo.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            C 1 Reply Last reply 15 Aug 2019, 03:39
            3
            • C Christian Ehrlicher
              14 Aug 2019, 17:42

              Your headers are twice in your repo.

              C Offline
              C Offline
              cerr
              wrote on 15 Aug 2019, 03:39 last edited by cerr
              #6

              @christian-ehrlicher said in error in generate automoc.cpp file???:

              Your headers are twice in your repo.

              Yes, that was it, I had created the include/ and missed to delete the files outside it! That solved it! Thanks! :)

              1 Reply Last reply
              1

              3/6

              14 Aug 2019, 14:42

              • Login

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