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. Qt 5.5.0 moc: explicitly need to define QT_VERSION
Forum Updated to NodeBB v4.3 + New Features

Qt 5.5.0 moc: explicitly need to define QT_VERSION

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
4 Posts 2 Posters 1.0k Views 3 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.
  • mahendra.kumarM Offline
    mahendra.kumarM Offline
    mahendra.kumar
    wrote on last edited by mahendra.kumar
    #1

    Hi,

    I am creating a Qt plugin on Mac and using Qt 5.5.0.
    This conforms to the standard way(s) of creating a Qt plugin.
    When running moc on the plugin source, I do not get the expected
    QT_MOC_EXPORT_PLUGIN(..., ...) /* name omitted */
    line that should be generated by moc to create a plugin.
    However if on the moc command I pass, -DQT_VERSION=0x050000, this line does get generated.

    However on Windows it works as expected, and -DQT_VERSION=0x050000 is not needed.

    Why is this difference in moc behaviour between Windows and Mac?
    Shouldn't moc 'know' the Qt Version without being explicitly told?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Are you running moc by hand ?

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

      mahendra.kumarM 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Are you running moc by hand ?

        mahendra.kumarM Offline
        mahendra.kumarM Offline
        mahendra.kumar
        wrote on last edited by
        #3

        @SGaist Hi,
        Its a Xcode project and moc (the version that is part of Qt 5.5.0) is called as part of the build phases.
        The header comment on top of the generated moc file confirms that the Qt version is 5.5.0

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Using the macx-xcode mkspec ?

          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

          • Login

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