Hello,
I’m new to Physx (and also to this forum) and i’d like to use SPH with physx. I’m having trouble creating the PxFoundation :
#include <extensions/PxDefaultErrorCallback.h>
#include <extensions/PxDefaultAllocator.h>
#include <foundation/PxFoundation.h>
#include <PxPhysicsAPI.h>
#include <iostream>
using namespace physx;
#pragma comment(lib, "PhysX3_x64.lib")
#pragma comment(lib, "Foundation.lib")
#pragma comment(lib, "PhysX3Extensions.lib")
#pragma comment(lib, "PhysX3Cooking_x64.lib")
#pragma comment(lib, "PxTask.lib")
int main(int argc, char *argv[])
{
bool recordMemoryAllocations = true;
PxDefaultErrorCallback gDefaultErrorCallback;
PxDefaultAllocator gDefaultAllocatorCallback;
PxFoundation *mFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, gDefaultAllocatorCallback, gDefaultErrorCallback);
if(!mFoundation)
std::cout<<"PxCreateFoundation failed!"<<std::endl;
return 0;
}
Compilation seems to work fine, but at the execution here is what i get :
1>------ Début de la génération : Projet : physxFluid, Configuration : Debug Win32 ------
1>main.obj : error LNK2019: symbole externe non résolu "public: __thiscall physx::PxDefaultErrorCallback::PxDefaultErrorCallback(void)" (??0PxDefaultErrorCallback@physx@@QAE@XZ) référencé dans la fonction _main
1>main.obj : error LNK2019: symbole externe non résolu "public: virtual __thiscall physx::PxDefaultErrorCallback::~PxDefaultErrorCallback(void)" (??1PxDefaultErrorCallback@physx@@UAE@XZ) référencé dans la fonction _main
1>main.obj : error LNK2019: symbole externe non résolu __imp__PxCreateFoundation référencé dans la fonction _main
1>G:\projects\physxFluid\Debug\physxFluid.exe : fatal error LNK1120: 3 externes non résolus
========== Génération : 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========
I don’t have any Foundation.lib in my physx installation. Any idea ? (i’m using visual studio 2012 professional)
Thanks !
Muska17