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. QT_NO_DEBUG used by files generated by moc
Forum Updated to NodeBB v4.3 + New Features

QT_NO_DEBUG used by files generated by moc

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.9k 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.
  • V Offline
    V Offline
    VivienDelmon
    wrote on last edited by
    #1

    Hi guys,

    I am using Qt4 and Qt5 with visual studio and I was stuck on a "bug" that told me that my plugin was compiled in debug when my project was in release, which was not the case.

    After checking lots of thing, I found that the file generated by moc.exe was relying on QT_NO_DEBUG to be defined in Release mod. I looked in Qt documentation and can't find anything about this macro, did I missed something ?

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

      Hi and welcome to devnet,

      No you didn't, it's mentioned e.g. "here":http://qt-project.org/doc/qt-5/debug.html

      This macro is defined when you are using Qt in release mode and QT_DEBUG when using the debug mode.

      Are you sure that you didn't forgot to rebuild something ? Or that you where looking in the wrong place for the plugin ?

      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
      • V Offline
        V Offline
        VivienDelmon
        wrote on last edited by
        #3

        Hi,

        Since I am using Visual Studio and its own build system, I don't have these macro declared by qmake (that I don't use). Is there any place where I can find all macro that are declared by qmake so I can add them to my build system when necessary ?

        The url that you pointed out speaks about enabling/disabling Q_ASSERT, Q_ASSERT_X, and other debugging macro. How can I meet this page when I use a Q_PLUGIN, with the Q_INTERFACES macro that uses QT_NO_DEBUG in the generated MOC file ?

        My feeling is that there is something missing in the plugin documentation or in the general macro you need to provide when compiling Qt base projects and/or moc generated files.

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

          I'd take a look at the qmake manual and if it doesn't contain what you need then go through the source

          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