Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. error: #error Exactly one of NDEBUG and _DEBUG needs to be defined!
Qt 6.12 LTS is out! See what's new in the release blog

error: #error Exactly one of NDEBUG and _DEBUG needs to be defined!

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 3 Posters 1.4k 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.
  • Q Offline
    Q Offline
    QtIsSoQute
    wrote on last edited by
    #1

    Getting following error when building Qt from source Dev branch
    cs/src/3rdparty/PhysX/source/common/src/CmRenderOutput.cpp
    In file included from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxMath.h:37,
    from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxVec3.h:37,
    from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxQuat.h:37,
    from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxMat44.h:36,
    from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/source/common/src/CmRenderOutput.cpp:31:
    D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h:456:2: error: #error Exactly one of NDEBUG and _DEBUG needs to be defined!
    456 | #error Exactly one of NDEBUG and _DEBUG needs to be defined!
    | ^~~~~

    SGaistS 1 Reply Last reply
    0
    • Q QtIsSoQute

      Getting following error when building Qt from source Dev branch
      cs/src/3rdparty/PhysX/source/common/src/CmRenderOutput.cpp
      In file included from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxMath.h:37,
      from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxVec3.h:37,
      from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxQuat.h:37,
      from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxMat44.h:36,
      from D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/source/common/src/CmRenderOutput.cpp:31:
      D:/QTDev6.5/qt6/qt6/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h:456:2: error: #error Exactly one of NDEBUG and _DEBUG needs to be defined!
      456 | #error Exactly one of NDEBUG and _DEBUG needs to be defined!
      | ^~~~~

      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You should also share details about:

      • your OS
      • compiler
      • command used to configure your Qt build

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

      V 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        You should also share details about:

        • your OS
        • compiler
        • command used to configure your Qt build
        V Offline
        V Offline
        vakh
        wrote on last edited by vakh
        #3

        @SGaist i have a same error when i want to build qt from source:
        Windows 10 Pro
        version: 21H1
        qt version: 6.6.0
        config command : configure.bat -release -static -prefix C:\Programs\Qt\Static\build-static -xcb
        build command : cmake --build . --parallel

        my compile log:
        [6/1552] Building CXX object qtquick3dphysics/src/3rdparty/PhysX/CMakeFiles/BundledPhysX.dir/source/common/src/CmCollection.cpp.obj
        FAILED: qtquick3dphysics/src/3rdparty/PhysX/CMakeFiles/BundledPhysX.dir/source/common/src/CmCollection.cpp.obj
        C:\Qt\Tools\mingw1120_64\bin\c++.exe -DMINGW_HAS_SECURE_API=1 -DNOMINMAX -DPX_COOKING -DPX_GCC_FAMILY -DPX_PHYSX_STATIC_LIB -DPX_SIMD_DISABLED -DQT_BUILD_PHYSXSTATIC_LIB -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_NO_AS_CONST -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DWIN32 -DWIN64 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_USE_MATH_DEFINES -D_WIN64 -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/BundledPhysX_autogen/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/characterkinematic -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/collision -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/common -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/common/windows -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/cooking -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/cudamanager -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/extensions -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/filebuf -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/foundation -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/geometry -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/geomutils -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/gpu -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/pvd -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/solver -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/task -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/vehicle -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/unix -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/windows -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/common/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/common/include/windows -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/common/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/fastxml/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/filebuf/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/unix -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/unix/neon -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/unix/sse2 -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/foundation/include/windows -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/ccd -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/common -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/contact -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/convex -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/distance -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/gjk -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/hf -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/intersection -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/mesh -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/pcm -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/geomutils/src/sweep -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/api/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/common/include/collision -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/common/include/pipeline -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/common/include/utils -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevel/software/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevelaabb/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowlevelaabb/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowleveldynamics/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/lowleveldynamics/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physx/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physx/src/buffering -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physx/src/device -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxcharacterkinematic/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxcooking/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxcooking/src/convex -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxcooking/src/mesh -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization/Binary -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization/File -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxextensions/src/serialization/Xml -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxgpu/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxmetadata/core/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxmetadata/extensions/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxvehicle/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/physxvehicle/src/physxmetadata/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/pvd/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/pvd/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/scenequery/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/scenequery/src -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/simulationcontroller/include -IC:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/simulationcontroller/src -IC:/Qt/Static/Src/qtbase/mkspecs/win32-g++ -IC:/Qt/Static/Src/qtbase/include -O2 -fvisibility=hidden -fno-keep-inline-dllexport -w -fno-exceptions -Wa,-mbig-obj -Wsuggest-override -std=c++17 -MD -MT qtquick3dphysics/src/3rdparty/PhysX/CMakeFiles/BundledPhysX.dir/source/common/src/CmCollection.cpp.obj -MF qtquick3dphysics\src\3rdparty\PhysX\CMakeFiles\BundledPhysX.dir\source\common\src\CmCollection.cpp.obj.d -o qtquick3dphysics/src/3rdparty/PhysX/CMakeFiles/BundledPhysX.dir/source/common/src/CmCollection.cpp.obj -c C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/common/src/CmCollection.cpp
        In file included from C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxSimpleTypes.h:40,
        from C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/Px.h:37,
        from C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/common/PxPhysXCommonConfig.h:37,
        from C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/common/PxSerialFramework.h:38,
        from C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/include/common/PxCollection.h:34,
        from C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/common/src/CmCollection.h:34,
        from C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/source/common/src/CmCollection.cpp:30:
        C:/Qt/Static/Src/qtquick3dphysics/src/3rdparty/PhysX/pxshared/include/foundation/PxPreprocessor.h:472:2: error: #error Exactly one of NDEBUG and _DEBUG needs to be defined!
        472 | #error Exactly one of NDEBUG and _DEBUG needs to be defined!
        | ^~~~~
        [11/1552] Building CXX object qtquickeffectmaker/tools/qqem/CMakeFiles/qqem.dir/qqem_autogen/mocs_compilation.cpp.obj
        ninja: build stopped: subcommand failed.

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

          Where did you get the sources from ?

          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
          • Unsolved