NxOgre Detritus Linker errors

developkelly21

10-12-2010 19:25:47

Hi,
I have downloaded the NxOgre Detritus and was trying to create a simple scene using Critter as the render system, however Critter seems to create a lot of linker errors, I have all the include directories set up and have compiled Critter Vc9 successfully. If i comment out the lines where the rendersystem is created it works, so all the include files are in place and being found. I am i missing someting really obvious??? thanks for any replys
void BasePhysX::setUpPhysics()
{
// Create the world.
mWorld = NxOgre::World::createWorld();

mWorld->getRemoteDebugger()->connect();

// Create the scene
NxOgre::SceneDescription scene_description;
scene_description.mGravity = NxOgre::Constants::MEAN_EARTH_GRAVITY;
scene_description.mUseHardware = false;

mScene = mWorld->createScene(scene_description);

// Set default material properties
mDefaultMaterial = mScene->getMaterial(0);
mDefaultMaterial->setRestitution(0.1f);
mDefaultMaterial->setDynamicFriction(0.9);
mDefaultMaterial->setStaticFriction(0.5);

// Plane creation
mScene->createSceneGeometry(NxOgre::PlaneGeometryDescription());
//This is the line that creates all the linker errors
// Create the rendersystem.
mRenderSystem = new Critter::RenderSystem(mScene, mSceneMgr);

//mRenderSystem->setVisualisationMode(NxOgre::Enums::VisualDebugger_ShowAll);
//Setup a BodyDescription.
Critter::BodyDescription bodyDescription;
bodyDescription.mMass = 40.0f; // Set the mass to 40kg.

// Finally create the body.
mBody = mRenderSystem->createBody(NxOgre::BoxDescription(1,1,1), NxOgre::Vec3(0,5,0), "cube.1m.mesh", bodyDescription);
}


Sample linker error: BasePhysX.obj : error LNK2019: unresolved external symbol "public: __thiscall Critter::BodyDescription::~BodyDescription(void)" (??1BodyDescription@Critter@@QAE@XZ) referenced in function "protected: void __thiscall BasePhysX::setUpPhysics(void)" (?setUpPhysics@BasePhysX@@IAEXXZ)

betajaen

10-12-2010 20:15:44

Sounds like Critter wasn't compiled properly, as you've said there.

Let's make it clear; you downloaded these?

https://github.com/betajaen/nxogre/zipball/detritus
https://github.com/betajaen/critter/zipball/master

developkelly21

11-12-2010 13:48:34

Ya i download both of those files again just to be sure and compiled Critter, which does so without any build errors but has two warnings :
NxOgreDebug.lib(NxOgreDebug.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in OgreMain_d.lib(OgreMain_d.dll); second definition ignored
NxOgreDebug.lib(NxOgreDebug.dll) : warning LNK4221: no public symbols found; archive member will be inaccessible

does this have any bearing on it?? Thanks for the help

developkelly21

11-12-2010 14:15:53

ok sorted it out, I'm an idiot was the main problem, but i forgot to put the linker to the library class for critterdebugstatic, builds and runs now. Thanks again!!!!!