Library problem

mathew_davis

09-01-2008 03:44:55

I have tried everything I can think of and I must be missing something stupid but I can't seem to track it down hopefully someone can point me in the right direction. So I went to walaber.com and downloaded OgreNewt along with the ogre sdk. I followed the tutorial and I can get all of the examples that come with the ogrenewt package, but when I do the rest of the tutorial I get the following errors

1>------ Build started: Project: Test_Bucket, Configuration: Release Win32 ------
1>Linking...
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::World::~World(void)" (??1World@OgreNewt@@QAE@XZ)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::World::World(void)" (??0World@OgreNewt@@QAE@XZ)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "class Ogre::Vector3 __cdecl OgreNewt::MomentOfInertia::CalcCylinderSolid(float,float,float)" (?CalcCylinderSolid@MomentOfInertia@OgreNewt@@YA?AVVector3@Ogre@@MMM@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "class Ogre::Vector3 __cdecl OgreNewt::MomentOfInertia::CalcBoxSolid(float,class Ogre::Vector3 const &)" (?CalcBoxSolid@MomentOfInertia@OgreNewt@@YA?AVVector3@Ogre@@MABV34@@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Body::setMassMatrix(float,class Ogre::Vector3 const &)" (?setMassMatrix@Body@OgreNewt@@QAEXMABVVector3@Ogre@@@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Body::setPositionOrientation(class Ogre::Vector3 const &,class Ogre::Quaternion const &)" (?setPositionOrientation@Body@OgreNewt@@QAEXABVVector3@Ogre@@ABVQuaternion@4@@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Body::setStandardForceCallback(void)" (?setStandardForceCallback@Body@OgreNewt@@QAEXXZ)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Body::attachToNode(class Ogre::Node *)" (?attachToNode@Body@OgreNewt@@QAEXPAVNode@Ogre@@@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::Body::Body(class OgreNewt::World const *,class OgreNewt::Collision const *,int)" (??0Body@OgreNewt@@QAE@PBVWorld@1@PBVCollision@1@H@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::CollisionPrimitives::Box::Box(class OgreNewt::World const *,class Ogre::Vector3 const &,class Ogre::Quaternion const &,class Ogre::Vector3 const &)" (??0Box@CollisionPrimitives@OgreNewt@@QAE@PBVWorld@2@ABVVector3@Ogre@@ABVQuaternion@5@1@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::CollisionPrimitives::Cone::Cone(class OgreNewt::World const *,float,float,class Ogre::Quaternion const &,class Ogre::Vector3 const &)" (??0Cone@CollisionPrimitives@OgreNewt@@QAE@PBVWorld@2@MMABVQuaternion@Ogre@@ABVVector3@5@@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::CollisionPrimitives::Cylinder::Cylinder(class OgreNewt::World const *,float,float,class Ogre::Quaternion const &,class Ogre::Vector3 const &)" (??0Cylinder@CollisionPrimitives@OgreNewt@@QAE@PBVWorld@2@MMABVQuaternion@Ogre@@ABVVector3@5@@Z)
1>Test_Bucket.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::BasicFrameListener::BasicFrameListener(class Ogre::RenderWindow *,class Ogre::SceneManager *,class OgreNewt::World *,int)" (??0BasicFrameListener@OgreNewt@@QAE@PAVRenderWindow@Ogre@@PAVSceneManager@3@PAVWorld@1@H@Z)
1>MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
1>..\..\bin\Release/Test_Bucket.exe : fatal error LNK1120: 14 unresolved externals
1>Build log was saved at "file://c:\Documents and Settings\Mathew_Davis.USOR-ENG\Desktop\project\TempNew\source\obj\Release\BuildLog.htm"
1>Test_Bucket - 15 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I thought it was that I was missing the ogrenewt_main.lib but I checked my project and as far as I can tell it's all there. If anyone can point me in the right direction I would sure appreciate it.

walaber

09-01-2008 05:16:23

it definately looks like your linker settings are not set up properly...

in the linker "input" section, have you entered OgreNewt_Main.lib?

mathew_davis

10-01-2008 03:42:56

This is what is in my linker input additional dependencies.

newton.lib
OgreMain.lib
OgreNewt_Main.lib
OIS.lib

If I am missing one please let me know.

Here is what I have in my VC++ directories
INCLUDES:
...\OgreNewt\demos\Include
...\OgreNewt\OgreNewt_Main\inc
.\Program Files\NewtonSDK\sdk
.\irrKlang-1.0.3\include
.\OgreSDK\include
.\OgreSDK\samples\include
.\Program Files\Microsoft DirectX SDK (April 2007)\Include
.\program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include

LIBRARY:
...\OgreNewt\demos\bin\release
...\OgreNewt\OgreNewt_Main\lib
.\Program Files\NewtonSDK\sdk\dll
.\Program Files\NewtonSDK\sdk
.\irrKlang-1.0.3\lib\Win32-visualStudio
.\OgreSDK\lib
.\program Files\Microsoft Directx SDK (April 2007)\Lib\x86
.\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

If there is something there that I am missing please let me know.

mathew_davis

10-01-2008 03:44:53

Man I feel stupid I had the OgreNewt Project open. I don't know how I missed that I added the input files and it got rid of those errors. Thanks a lot. I am getting another error now I haven't tried digging into it yet but if you have something before I figure it out please post it here. I will post the solution if I find it.

1>MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
1>..\..\bin\Release/Test_Bucket.exe : fatal error LNK1120: 1 unresolved externals


Thanks,
Matt

mathew_davis

10-01-2008 03:54:48

I am sorry to fill this form with useless information. It has just been a long day. The problem which should be obvious to anyone who reads the error is that I forgot to add in my WinMain. Again thanks for your help.