How to use PhysX on Linux

PhysX is a 3D game physics engine provided by NVIDIA. They have released the source code of the engine on Github, though with restricted access. This library and its sample programs can be compiled from source easily.

Here are my notes on how to compile this library, run its sample tools and get started:

  • You need a Linux computer (I use Ubuntu), with a fairly modern NVIDIA graphics card.

  • Make sure you have installed recent NVIDIA graphics drivers and a recent version of CUDA on it. Ensure that these are working correctly before trying PhysX.

  • Go to this webpage and jump through their hoops to get access to the PhysX Github page. Essentially, NVIDIA requires you to create a login with them and after that they give your Github login the access to their PhysX source code.

  • Once you have access to PhysX source code, clone its repository to your computer:

$ git clone
  • The documentation in the source code is outdated and is misleading. This is how the source code is laid out: Source for source code, Snippets and Samples have small programs to try PhysX. Once you have compiled these Snippets and Samples, their binaries will be placed in Bin/linux64.

  • Each of the above three code directories has a compiler/linux64 directory which holds the Makefiles to build them. There are four build profiles available: release, profile, checked and debug. Just invoking make builds all four versions. To build just the release versions, I did make release in all the three code directories.

  • Once the library and its snippets and samples are built, you can try these programs from Bin/linux64. For example, the samples program allows you try many of the features of the engine in an interactive GUI.

Tried with: PhysX 3.3.4, NVIDIA GeForce GTX 750 Ti and Ubuntu 14.04

3 thoughts on “How to use PhysX on Linux”

  1. Thanks for the article but please I have a question(i know its kinda stupid )I am a beginner at this and want to know if you must use a game engine to use the sdk or you can use the ide directly without a physics


    1. Frank: No need to use a game engine. I did not use a game engine. I just read their documentation, wrote code including PhysX headers and linked with their libraries.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s