I successfully managed to integrate PhysX into my small engine project, which I primarily develop on windows. Now I decided to make the engine also work on Linux platforms. I managed to compile the project without PhysX but not matter what knobs I turn, It just don’t want to compile with PhysX enabled.
Here is the error message including the compile command and the compiler flags I am getting:
/usr/bin/g++ -o bin/x86_64/Debug/Game @"Game.txt" -L. -L../PhotonBox/vendor/freetype/lib -L../PhotonBox/vendor/glad/lib -L../PhotonBox/vendor/GLFW/lib -L../PhotonBox/vendor/imgui/lib -L../PhotonBox/vendor/KHR/lib -L../PhotonBox/vendor/STB/lib -L../PhotonBox/vendor/zlib/lib -L../PhotonBox/vendor/PhysX/lib/debug -L../PhotonBox/vendor/PhysX/bin/debug -m64 ../PhotonBox/bin/x86_64/Debug/libPhotonBox.a -lglfw3 -lzlib -lfreetype -lGL -lGLU -lX11 -lpng -lXxf86vm -lXrandr -lXinerama -lXcursor -lpthread -lXi -ldl -lPhysX3DEBUG_x64 -lPhysX3CommonDEBUG_x64 -lPxFoundationDEBUG_x64 -lPhysX3ExtensionsDEBUG /usr/bin/ld: ../PhotonBox/vendor/PhysX/bin/debug/libPhysX3DEBUG_x64.so: undefined reference to symbol '_ZN5physx28PxTransformFromPlaneEquationERKNS_7PxPlaneE' ../PhotonBox/vendor/PhysX/bin/debug/libPhysX3CommonDEBUG_x64.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
I looked up PxTransformFromPlaneEquation which seems to be defined in the PxFoundation, which I am including. I also tried including them in a different order, but that just spits out different errors.
PS: Since PhysX does not generate .a files (for example PhysX3_x64.a), I just plug the .so files as if they were static. I am not sure if this is the way to do it but it somehow seems to almost work.
Would really appreciate if anyone could hint me into the right direction.
Here is the repo if needed: https://github.com/Haeri/PhotonBox/tree/dev