Last year I worked on a game engine, and I used PhysX 3.3.1 at the time. As suggested in the guide, I included precompiled …CHECKED.lib’raries in my project for debug configuration. I had to switch “Runtime Library” setting of my project in Visual Studio from “Multi-threaded Debug DLL” (dynamic, /MDd) to “Multi-threaded Debug” (static, /MTd), but that was OK. Everything worked fine.
Now I returned to that project, and as nVidia generously released PhysX 3.3.3 with sources, I decided to update to this new version. But I’ve encountered a problem. In project settings for PhysX 3.3.3 only DEBUG configuration has “Runtime Library” set to debug one (/MTd). All other build configurations has no-debug setting (/MT). So, if I try to include CHECKED lib’s, built with default settings, into my project, I get LNK2038 error (MD - MDd mismatch).
So my question is - how is version 3.3.3 supposed to be build and used for production configuration of another project (i.e. debug builds)? Manual strongly recommends, as I mentioned before, to use CHECKED builds of PhysX. Am I supposed to change my project’s “Runtime Library” setting to non-debug (for example, /MT or /MD)? I tried to build PhysX CHECKED configuration with /MDd setting, but got “_DEBUG / NDEBUG” errors, which I wasn’t able to fix via preprocessor definitions. I was able to include PhysX DEBUG build in my project’s debug configuration and RELEASE build in release configuration respectively without any problems. But have no idea how as I supposed to include CHECKED one. I don’t want to use it for release builds obviously, but wasn’t able to make it work with debug builds with debug RTLs.
I guess I may not understand something very simple as other people happily use PhysX without such questions. But anyway big thanks in advance for any response.