#StackBounty: #c++ #physx How do you compile standalone snippets in Nvidia PhysX?

Bounty: 50

I started to test PhysX by experimenting on the basic Hello World snippet shipped by the program.

My installation is on Ubuntu 20.04.

As I understand the source code for

/home/ubuntu1/PhysX/physx/bin/linux.clang/release/SnippetHelloWorld_64

is located in

/home/ubuntu1/PhysX/physx/snippets/snippethelloworld

I tried to compile it by

clang++ -I/home/ubuntu1/PhysX/physx/install/linux/PhysX/include 
-I/home/ubuntu1/PhysX/physx/install/linux/PxShared/include 
SnippetHelloWorld.cpp

but I got an error

In file included from SnippetHelloWorld.cpp:39:
In file included from /home/ubuntu1/PhysX/physx/install/linux/PhysX/include/PxPhysicsAPI.h:45:
In file included from /home/ubuntu1/PhysX/physx/install/linux/PxShared/include/foundation/Px.h:37:
In file included from /home/ubuntu1/PhysX/physx/install/linux/PxShared/include/foundation/PxSimpleTypes.h:40:
/home/ubuntu1/PhysX/physx/install/linux/PxShared/include/foundation/PxPreprocessor.h:444:2: error: Exactly one of NDEBUG and _DEBUG needs to be defined!
#error Exactly one of NDEBUG and _DEBUG needs to be defined!
 ^
1 error generated.

Apparently, I should code within an environment. Almost all instructions of PhysX are for Windows using Visual Studio IDE.

Where should I define NDEBUG or _DEBUG when my aim is just to reproduce SnippetHelloWorld_64?

In other words, how can I experiment with HelloWorld in PhysX (by Linux command-line)?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.