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 missing macro name
Forum Updated to NodeBB v4.3 + New Features

Moc missing macro name

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 2.5k 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.
  • I Offline
    I Offline
    IvanC
    wrote on 28 Aug 2020, 14:22 last edited by
    #1

    Hi, I've imported a project, fix a couple of libraries missing. Compiled and at the end an error appear:
    moc: Missing macro name
    Usage: C:\Qt\5.9.9\msvc2017_64\bin\moc.exe [options] [header-file] [@option-file]
    Qt Meta Object Compiler version 67 (Qt 5.9.9)

    I've tried to google it, but no hints. Do you have an Idea fo what could be wrong. Classes seems to be ok.
    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 28 Aug 2020, 17:29 last edited by
      #2

      Hi,

      Do you have any custom macro ?

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

      1 Reply Last reply
      0
      • I Offline
        I Offline
        IvanC
        wrote on 29 Aug 2020, 05:42 last edited by
        #3

        Not in the classes he is complaining, but good advice, I will look for them.

        1 Reply Last reply
        0
        • I Offline
          I Offline
          IvanC
          wrote on 29 Aug 2020, 05:58 last edited by
          #4

          One hint: the project compiles if I use Visual Studio with Qt add ons. When I try to compile it in QtCreator if gives missing macro name and no moc are generated at all.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 29 Aug 2020, 11:05 last edited by
            #5

            Can you share your .pro file ?

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

            1 Reply Last reply
            0
            • I Offline
              I Offline
              IvanC
              wrote on 29 Aug 2020, 16:51 last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • I Offline
                I Offline
                IvanC
                wrote on 30 Aug 2020, 07:45 last edited by
                #7

                Hi, thanks. Solved it. Actually in the .pro file I had a macro definition with assignment, and the assignment value was not known. I substitute it with a int value and everything was back ok!

                1 Reply Last reply
                1

                1/7

                28 Aug 2020, 14:22

                • Login

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