QT release build defining both _DEBUG and NDEBUG and causing issued with PhysX
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.
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.
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.
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.
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".
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.
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.