Qt Creator integration with PhysX



  • I am trying to use the physX library within Qtcreator. I Have alredy linked the library files and set the external include paths. Te code is pretty simple but when i try to build it, I have this error:

    main.obj:-1: error: LNK2019: símbolo externo "public: __cdecl physx::PxDefaultErrorCallback::PxDefaultErrorCallback(void)" (??0PxDefaultErrorCallback@physx@@QEAA@XZ) sin resolver al que se hace referencia en la función "void __cdecl `dynamic initializer for 'gErrorCallback''(void)" (??__EgErrorCallback@@YAXXZ)

    This is the code:
    #include <iostream>
    #include <ctype.h>
    #include "PxPhysicsAPI.h"

    using namespace std;
    using namespace physx;

    static PxDefaultErrorCallback gErrorCallback;
    static PxDefaultAllocator gAllocatorCallback;
    PxFoundation *mFoundation;

    int main()
    {

    mFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, gAllocatorCallback,
        gErrorCallback);
    if(!mFoundation)
        printf("PxCreateFoundation failed!");
    cout << "Hello World!" << endl;
    return 0;
    

    }


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.