How to link PhysX libraries with Xcode

106 Views Asked by At

I am new to c++. I am unaware with how to link the PhysX source to my own code. I keep getting "Px.h" or some other file missing. The files exist in their corresponding folders but Xcode can't find them. What do I do? Thank you so much for your help, I am extremely grateful.

1

There are 1 best solutions below

1
The Floating Brain On

I would look up a tutorial on linking: really any library in the Xcode environment. You can search for that here or using your favorite search engine. I am not familiar with Xcode, generally however, you need to specify "include directories" somewhere in the options, as well as a "library directory" and which "library files" need to be linked (.o .so .dylib as far as I can tell on mac). "Include directories" are where .h files are located. .h files tell the compiler what is inside .o .dylib and .so files which are "binary files" like your executable is.

If you were compiling from command line with gcc, it would look something like this

g++ Main.cpp -I /path/to/include -L /path/to/lib -l PhysX.so PhysXSomethingElse.so -o MyExecutable.app