I have a problem with unresolved external symbols. :(:(

snstr

10-12-2007 23:40:38

I keep getting this error. I am using the latest version of Newton, Ogre3d and OgreNewt. I followed the tutorial and placed every filepath in order. I compiled the OgreNewt everything was neat. But check this out:

Compiling...
main.cpp
Linking...
main.obj : error LNK2019: unresolved external symbol "public: __thiscall OgreNewt::World::World(void)" (??0World@OgreNewt@@QAE@XZ) referenced in function "protected: virtual void __thiscall TutorialApplication::createScene(void)" (?createScene@TutorialApplication@@MAEXXZ)
..\bin\Debug\3dhags.exe : fatal error LNK1120: 1 unresolved externals


Do any of you have an idea why?
Thanks a lot

snstr

11-12-2007 01:41:17

also when i include the OgreNewt_Main_d.lib this happens

Linking...
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonMaterialGetDefaultGroupID referenced in function "public: __thiscall OgreNewt::World::World(void)" (??0World@OgreNewt@@QAE@XZ)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonWorldSetUserData referenced in function "public: __thiscall OgreNewt::World::World(void)" (??0World@OgreNewt@@QAE@XZ)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonCreate referenced in function "public: __thiscall OgreNewt::World::World(void)" (??0World@OgreNewt@@QAE@XZ)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonDestroy referenced in function "public: __thiscall OgreNewt::World::~World(void)" (??1World@OgreNewt@@QAE@XZ)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonUpdate referenced in function "public: void __thiscall OgreNewt::World::update(float)" (?update@World@OgreNewt@@QAEXM@Z)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonGetTimeStep referenced in function "public: float __thiscall OgreNewt::World::getTimeStep(void)const " (?getTimeStep@World@OgreNewt@@QBEMXZ)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonSetWorldSize referenced in function "public: void __thiscall OgreNewt::World::setWorldSize(class Ogre::Vector3 const &,class Ogre::Vector3 const &)" (?setWorldSize@World@OgreNewt@@QAEXABVVector3@Ogre@@0@Z)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonSetBodyLeaveWorldEvent referenced in function "public: void __thiscall OgreNewt::World::setLeaveWorldCallback(class boost::function<void __cdecl(class OgreNewt::Body *),class std::allocator<void> >)" (?setLeaveWorldCallback@World@OgreNewt@@QAEXV?$function@$$A6AXPAVBody@OgreNewt@@@ZV?$allocator@X@std@@@boost@@@Z)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonBodyGetUserData referenced in function "private: static void __cdecl OgreNewt::World::newtonLeaveWorld(struct NewtonBody const *)" (?newtonLeaveWorld@World@OgreNewt@@CAXPBUNewtonBody@@@Z)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonWorldGetUserData referenced in function "private: static void __cdecl OgreNewt::World::newtonLeaveWorld(struct NewtonBody const *)" (?newtonLeaveWorld@World@OgreNewt@@CAXPBUNewtonBody@@@Z)
OgreNewt_Main_d.lib(OgreNewt_World.obj) : error LNK2019: unresolved external symbol __imp__NewtonBodyGetWorld referenced in function "private: static void __cdecl OgreNewt::World::newtonLeaveWorld(struct NewtonBody const *)" (?newtonLeaveWorld@World@OgreNewt@@CAXPBUNewtonBody@@@Z)
OgreNewt_Main_d.lib(OgreNewt_MaterialID.obj) : error LNK2019: unresolved external symbol __imp__NewtonMaterialCreateGroupID referenced in function "public: __thiscall OgreNewt::MaterialID::MaterialID(class OgreNewt::World const *)" (??0MaterialID@OgreNewt@@QAE@PBVWorld@1@@Z)
..\bin\Debug\3dhags.exe : fatal error LNK1120: 12 unresolved externals


Where am i wrong? Thanks a lot :)

twilight17

11-12-2007 16:22:19

did you add the directories in Tools->then options?
you have to make sure VC++ is finding the libs

snstr

11-12-2007 16:44:20

Thanks a lot i did so, i just solved the problem. There are a lot of newton.lib s in newton, i picked another one and it did work. :)

walaber

11-12-2007 23:39:45

in all projects that use OgreNewt, you need to make sure to link to OgreNewt_Main.lib AND newton.lib (from the Newton SDK).