Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Tags in this Discussion

Linker issue with RepXCollection
  • Hello,

    I'm trying to use RepX file to import model in my physic's scene but I encounter some link issues as below.

    1>PhysicEngine.obj : error LNK2001: unresolved external symbol "public: static class physx::repx::RepXCollection & __cdecl physx::repx::RepXUpgrader::upgradeCollection(class physx::repx::RepXCollection &)" (?upgradeCollection@RepXUpgrader@repx@physx@@SAAAVRepXCollection@23@AAV423@@Z)


    I'm currently using PhysX 3.1.2 with VS10, also I added the lib in my project and below the code used:

    #include <RepXUtility.h>
    #pragma comment(lib, "RepX3.lib")
    ...
    {
    PxStringTable* stringTable = &PxStringTableExt::createStringTable(default_alloc_);
    RepXCollection* collection = createCollection("media/test/models_px/theiere.RepX", getFoundation().getAllocator());
    repx::RepXIdToRepXObjectMap* theIdMap = RepXIdToRepXObjectMap::create(getFoundation().getAllocator());
    addObjectsToScene(collection, sdk_, cooking_, scene_, stringTable);

    physx::repx::instantiateCollection(collection, theIdMap, sdk_, cooking_, stringTable, true, RepXCoreItemAdder(scene_));//MyOwnRepXCoreItemAdder(scene_) );

    theIdMap->destroy();
    collection->destroy();
    stringTable->release();
    }


    Thanks,
    Kenzo
  • 2 Comments sorted by
  • Vote Up0Vote Down Hai Loc Lu
    Posts: 102 Accepted Answer
    Try to include RepXUpgrader3.lib.
  • Ok thanks, I was tired. I'have include in my project RepXUpgrader3DEBUG.lib (after built it) for my debug configuration, and RepXUpgrader3.lib for the release. I've done like this:

    #pragma comment(lib, "PhysX3_x86.lib")
    #pragma comment(lib, "PhysX3Cooking_x86.lib")
    #pragma comment(lib, "PxToolkit.lib")
    #ifdef _DEBUG
    #pragma comment(lib, "FoundationDEBUG.lib")
    #pragma comment(lib, "PhysX3ExtensionsDEBUG.lib")
    #pragma comment(lib, "RepX3DEBUG.lib")
    #pragma comment(lib, "RepXUpgrader3DEBUG.lib")
    #else
    #pragma comment(lib, "Foundation.lib")
    #pragma comment(lib, "PhysX3Extensions.lib")
    #pragma comment(lib, "PxTask.lib")
    #pragma comment(lib, "RepX3.lib")
    #pragma comment(lib, "RepXUpgrader3.lib")
    #endif


    Thanks.