windows-runtimec++-cxphysx

Trying to Link to PhysX libraries in windows runtime application


I have a default, blank windows store application with the following code added:

#include<PxPhysicsAPI.h>

static physx::PxDefaultErrorCallback gDefaultErrorCallback;

I have the following in my Linker->Input->Additional Dependencies setting:

PhysX3CHECKED_arm.lib 
PhysX3CommonCHECKED_arm.lib
PhysX3ExtensionsCHECKED.lib

I have added the include directory: MyPhysXPath\Include

The libraries are in this directory: MyPhysXPath\Lib\win8arm

If I add that path to the "Library Directories" setting I get a LNK2019 error for PxDefaultErrorCallback.

If I add that path to the "Libraries WinRT Directories" setting I get a LNK1104 error for PhysX3CHECKED_arm.lib.

If I add that path to both settings I get the LNK2019 error.

It's easy to get the project to build by linking to the win32 libraries, but it won't run.

My questions are:

  1. Am I right that I need to link to the winRT version of the PhysX SDK and not the x86 version for a windows 8 PC metro application?
  2. Assuming that is correct, what is the proper way to link to the WinRT libraries?

thank you!


Solution

  • Nvidia has a specific set of libraries to target WinRT on an x86 platform.