Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QT release build defining both _DEBUG and NDEBUG and causing issued with PhysX
Qt 6.11 is out! See what's new in the release blog

QT release build defining both _DEBUG and NDEBUG and causing issued with PhysX

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 3 Posters 5.0k 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
    DavidJames
    wrote on last edited by
    #1

    Hello, I am trying to build an editor that links with my game engine and I am running into this issue. In PhysX I get this error: "Exactly one of NDEBUG and _DEBUG needs to be defined by preprocessor" when I build the project in release mode. The debug build works fine. So for some reason the release build is defining both NDEBUG and _DEBUG for some reason.

    I should also add that I am using a VS2012 build of QT, but I get the same error when I build with the VS2010 version.

    Also I am forced to use QT 4.8.4, because when I try to compile with 5.0.1 I get a bunch of OpenGL redefinition errors, but I am fine working with 4.8.4.

    Thanks,
    David

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

      Can no one help me? I really need to fix this and I have no idea what the problem is. Please any insight at all will help.

      Thanks,
      David

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        welcome to devnet

        There is no need to "duplicate":http://qt-project.org/forums/viewthread/26478/ respectively "triplicate":http://qt-project.org/forums/viewthread/26479/postings in devnet. Therefore, closing you other posts.

        While reading your post, I would assume that it has something to do with the IDE settings of msvc2010 respectively msvc2012.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DavidJames
          wrote on last edited by
          #4

          so its one of the settings, thats helpful. Can you at least move this to the installation and development forum hopefully someone there can help me.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            As you wish going to move to installation and development. I am leaving a link in this forum.

            Did you check the build properties of msvc? I assume that these defines are somewhere set there.
            The old msvc2005 had under "properties">>"C/C++">>"Preprocessor" the "preprocessor definitions".

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DavidJames
              wrote on last edited by
              #6

              thanks, but it cant be anything in the visual studio properties because my other project compiles just fine in visual studio. It has to be a setting in QT somewhere.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                Well, NDEBUG and _DEBUG are macro settings used during compilation. Their meaning are almost exactly the opposite.
                Certainly, I do not know the inner details of Qt, but if Qt would have such a problem, you would not be the only one reporting.
                Both macros are set implicitly or explicitly by IDEs dependent on the compilation mode (debug or release mode). Therefore, the chances are pretty high that something is mixed up for this particular project. The settings I am referring to are project specific.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  feistykittykat
                  wrote on last edited by
                  #8

                  @DavidJames Did this ever get resolved for you? I'm running into the exact same issue, seven years later!

                  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