On Windows, PhysX requires Visual Studio 2013 or later versions.
The PhysX headers should compile cleanly at the highest typical warning levels (/W4 for Visual Studio, -Wall -Wextra -pedantic for gcc- and clang-based compilers.) Stricter warning settings may result in a small number of benign informational warnins.
The PhysX source projects and snippets will compile cleanly using the project files or makefiles supplied.
The SDK has four build configurations available, designed for different stages of development and deployment.
Simulation works the same way in all of them, and all are compiled with high optimization levels (except debug configuration).
Note
We strongly recommend that you use the checked build as the primary configuration for day-to-day development and QA.
Note
PhysX libraries of different build configurations (e.g. the DEBUG version of PhysXVehicle and the CHECKED version of PhysXVisualDebuggerSDK) should never be mixed in an application because this will result a CRT conflict.
To build your own PhysX app, you will need to add some include paths and libraries to your project makefile or IDE.
Users should specify the root "Include" and "Lib" folders in the additional include, and library directories respectively. There is a combined include header available as:
#include "PxPhysicsAPI.h"
This will include the entire PhysX API including core, extensions, vehicles, etc. It is also possible to include subsets of the SDK if preferred, for example:
#include "vehicle/PxVehicleSDK.h"
At a minimum, applications need to link against the following libraries with the appropriate platform extension (e.g. ".lib" or ".a") and with * being a x86 or x64 for Windows platforms:
Note
The static libraries we provide with the Windows binary distribution are linked against the Multi-Threaded static C Run-Time (CRT) libraries. This means that your application must also use the same CRT flavor. If you need to use a different CRT version, you must upgrade to our source license. The source distribution can simply be recompiled using different CRT settings.
On the Windows platform, you need to redistribute some of our DLLs to end users as part of your application:
Where * is a platform specific suffix, e.g. x86 or x64. You will need one or the other depending on whether your application is built in 64 bit mode.