Note that there are some explanatory texts on larger screens.

plurals
  1. POInstalling and Linking PhysX Libraries in Debian Linux
    text
    copied!<p>I am trying to get PhysX working using Ubuntu.</p> <p>First, I downloaded the SDK here:</p> <ul> <li><a href="http://developer.download.nvidia.com/PhysX/2.8.1/PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz" rel="nofollow noreferrer">http://developer.download.nvidia.com/PhysX/2.8.1/PhysX_2.8.1_SDK_CoreLinux_deb.tar.gz</a></li> </ul> <hr> <p>Next, I extracted the files and installed each package with:</p> <pre><code>dpkg -i filename.deb </code></pre> <p>This gives me the following files located in /usr/lib/PhysX/v2.8.1:</p> <ul> <li>libNxCharacter.so</li> <li>libNxCooking.so</li> <li>libPhysXCore.so</li> <li>libNxCharacter.so.1</li> <li>libNxCooking.so.1</li> <li>libPhysXCore.so.1</li> </ul> <hr> <p>Next, I created symbolic links to /usr/lib:</p> <pre><code>sudo ln -s /usr/lib/PhysX/v2.8.1/libNxCharacter.so.1 /usr/lib/libNxCharacter.so.1 sudo ln -s /usr/lib/PhysX/v2.8.1/libNxCooking.so.1 /usr/lib/libNxCooking.so.1 sudo ln -s /usr/lib/PhysX/v2.8.1/libPhysXCore.so.1 /usr/lib/libPhysXCore.so.1 </code></pre> <hr> <p>Now, using Eclipse, I have specified the following libraries (-l):</p> <ul> <li>libNxCharacter.so.1</li> <li>libNxCooking.so.1</li> <li>libPhysXCore.so.1</li> </ul> <p>And the following search paths just in case (-L):</p> <ul> <li>/usr/lib/PhysX/v2.8.1</li> <li>/usr/lib</li> </ul> <p>Also, as Gerald Kaszuba suggested, I added the following include paths (-I):</p> <ul> <li>/usr/lib/PhysX/v2.8.1</li> <li>/usr/lib</li> </ul> <hr> <p>Then, I attempted to compile the following code:</p> <pre><code>#include "NxPhysics.h" NxPhysicsSDK* gPhysicsSDK = NULL; NxScene* gScene = NULL; NxVec3 gDefaultGravity(0,-9.8,0); void InitNx() { gPhysicsSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION); if (!gPhysicsSDK) { std::cout&lt;&lt;"Error"&lt;&lt;std::endl; return; } NxSceneDesc sceneDesc; sceneDesc.gravity = gDefaultGravity; gScene = gPhysicsSDK-&gt;createScene(sceneDesc); } int main(int arc, char** argv) { InitNx(); return 0; } </code></pre> <p>The first error I get is:</p> <blockquote> <p>NxPhysics.h: No such file or directory</p> </blockquote> <p>Which tells me that the project is obviously not linking properly. Can anyone tell me what I have done wrong, or what else I need to do to get my project to compile? I am using the GCC C++ Compiler. Thanks in advance!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload