Error 1 error LNK2001: unresolved external symbol "__de

jauja

02-07-2007 19:39:29

Now I can compile the a sample project that only contains the following lines:
#include <NxOgre.h>
using namespace NxOgre;

When i add the code(got from wiki) to create the scene


void createScene(void)
{
World *mWorld = new World();
Scene* mScene = mWorld->createScene("Main",mSceneMgr, "gravity: yes, floor: yes");
Body *myBody = mScene->createBody("cube.1m.mesh",new CubeShape(1,1,1),Vector3(0,3.5,0), "mass: 10");
// put your scene creation in here
}


I obtain the following errors:

Error 1 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall NxOgre::ShapeParams::~ShapeParams(void)" (__imp_??1ShapeParams@NxOgre@@QAE@XZ) file.obj

Error 2 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class NxOgre::Body * __thiscall NxOgre::Scene::createBody(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class NxOgre::ShapeDescription *,class NxOgre::Pose const &,class NxOgre::ActorParams)" (__imp_?createBody@Scene@NxOgre@@QAEPAVBody@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVShapeDescription@2@ABVPose@2@VActorParams@2@@Z) file.obj

...


and so more, till 16..

betajaen

02-07-2007 19:43:06

Are you linking to NxOgre.lib as a dynamic library?

jauja

02-07-2007 19:50:49

i dont know...
I copied the NxOgre.lib to OGRESDK\lib
and de NxOgre.dll to OGRESDK\bin\debug

i thought that if those directoryes where already included in the libpath this couldbe work
...

i supose im wrong ejeje

betajaen

02-07-2007 19:53:46

You don't need to copy NxOgre.lib anywhere.

If your unsure how it works Follow this from a newer thread.

frier

03-07-2007 02:15:56

I had a problem similar to this.

If your using Visual C++ 8.

Right Click on your Project->properties->Linker->Input->Additional Dependencies-> and add this one: NxOgre_d.lib