Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. When I build library which uses Qt with cmake I get error "AUTOGEN: error: pluginmanager.cpp: The file contains a Q_OBJECT macro, but does not include pluginmanager.moc"
Forum Updated to NodeBB v4.3 + New Features

When I build library which uses Qt with cmake I get error "AUTOGEN: error: pluginmanager.cpp: The file contains a Q_OBJECT macro, but does not include pluginmanager.moc"

Scheduled Pinned Locked Moved Qt Creator and other tools
cmake
3 Posts 1 Posters 2.8k 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.
  • D Offline
    D Offline
    Dmitriy Shmykov
    wrote on last edited by
    #1

    When I build library which uses Qt with cmake I get error

    "AUTOGEN: error: pluginmanager.cpp: The file contains a Q_OBJECT macro, but does not include pluginmanager.moc".

    I have a cmake-project in which I want to reuse some of the QtCreator sources. When I include src/libs/extensionsystem sources cmake tells that error.

    I ask if anyone met this situation when building qt project parts using cmake.

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

      The problem have solved.

      cmake autogen cannot properly handle Q_OBJECT if it's in the source code comments. pluginmanager.cpp contains the documentations with code samples that contain "Q_OBJECT" text.

      So I've removed "Q_OBJECT" from comments and autogen worked out.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dmitriy Shmykov
        wrote on last edited by
        #3

        I've submitted the bug on cmake project. http://public.kitware.com/Bug/view.php?id=15751

        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