Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt 5.0.2 on 64-bit Windows and moc issue

    Tools
    2
    3
    1446
    Loading More Posts
    • 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.
    • W
      Westley last edited by

      I am a Qt novice and inherited a running Qt app (Qt SDK 4.8) based on Linux and told to port in to 64-bit Windows 7 using MS VS2012. I downloaded Qt 5.0.2 and after making decent progress ran into a obstacle I can’t figure out. The moc app generates a .cpp file which contains:

      #if !defined(Q_MOC_OUTPUT_REVISION)
      #error “The header file ‘mhnodegui.h’ doesn’t include <QObject>.”
      #elif Q_MOC_OUTPUT_REVISION != 63
      #error “This file was generated using the moc from 4.8.2. It”
      #error “cannot be used with the include files from this version of Qt.”
      #error “(The moc has changed too much.)”
      #endif
      The curious thing is that under Qt 5.0.2, Q_MOC_OUTPUT_REVISION is defined as 67 yet the actual moc.exe which is installed with the distribution is 63, the one from Qt 4.8.4. The end result is that I can’t compile the moc generated file. I tried changing the definition of Q_MOC_OUTPUT_REVISION to 63 as an experiment to force the compilation to continue with numerous fatal compilation errors. It would appear to me that there is some inconsistency in the 5.0.2 64-bit distribution with respect to moc but, as a total novice, I am sure the problem is something I’m doing but have no idea what.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Please, don't duplicate your posts, rather ask to have them moved to the right subforum.

        Anyway, I've posted a possible solution on your original post.

        Hope it helps

        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 Reply Quote 0
        • W
          Westley last edited by

          Sorry about that. Whom and how do you ask?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post