I tried adding ogreNewt to a project of mine

grizzley90

27-01-2006 01:05:18

The new project is not in the ogreNewt folder does that have any effect? because im getting linker errors.

1>Linking...
1>Demo.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>Demo.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Body::attachToNode(class Ogre::SceneNode *)" (?attachToNode@Body@OgreNewt@@QAEXPAVSceneNode@Ogre@@@Z)
1>Demo.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>Demo.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::CollisionPrimitives::TreeCollision::TreeCollision(class OgreNewt::World const *,class Ogre::SceneNode *,bool)" (??0TreeCollision@CollisionPrimitives@OgreNewt@@QAE@PBVWorld@2@PAVSceneNode@Ogre@@_N@Z)
1>Demo.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::BasicFrameListener::BasicFrameListener(class Ogre::RenderWindow *,class Ogre::Camera *,class Ogre::SceneManager *,class OgreNewt::World *,int)" (??0BasicFrameListener@OgreNewt@@QAE@PAVRenderWindow@Ogre@@PAVCamera@3@PAVSceneManager@3@PAVWorld@1@H@Z)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol __imp__NewtonVehicleSetTireTorque
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol __imp__NewtonVehicleSetTireSteerAngle
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Vehicle::Tire::updateNode(void)" (?updateNode@Tire@Vehicle@OgreNewt@@QAEXXZ)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall OgreNewt::Vehicle::Tire::~Tire(void)" (??1Tire@Vehicle@OgreNewt@@UAE@XZ)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: __thiscall OgreNewt::Vehicle::Tire::Tire(class OgreNewt::Vehicle *,class Ogre::Quaternion,class Ogre::Vector3,class Ogre::Vector3,float,float,float,float,float,float,int)" (??0Tire@Vehicle@OgreNewt@@QAE@PAV12@VQuaternion@Ogre@@VVector3@4@2MMMMMMH@Z)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: class OgreNewt::Vehicle::Tire const * __thiscall OgreNewt::Vehicle::getNextTire(class OgreNewt::Vehicle::Tire *)const " (?getNextTire@Vehicle@OgreNewt@@QBEPBVTire@12@PAV312@@Z)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: class OgreNewt::Vehicle::Tire const * __thiscall OgreNewt::Vehicle::getFirstTire(void)const " (?getFirstTire@Vehicle@OgreNewt@@QBEPBVTire@12@XZ)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Vehicle::destroy(void)" (?destroy@Vehicle@OgreNewt@@QAEXXZ)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Vehicle::init(class OgreNewt::Body *,class Ogre::Vector3 const &)" (?init@Vehicle@OgreNewt@@QAEXPAVBody@2@ABVVector3@Ogre@@@Z)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall OgreNewt::Vehicle::~Vehicle(void)" (??1Vehicle@OgreNewt@@UAE@XZ)
1>SimpleVehicule.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>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Body::setMassMatrix(float,class Ogre::Vector3 const &)" (?setMassMatrix@Body@OgreNewt@@QAEXMABVVector3@Ogre@@@Z)
1>SimpleVehicule.obj : error LNK2001: unresolved external symbol "public: void __thiscall OgreNewt::Body::setStandardForceCallback(void)" (?setStandardForceCallback@Body@OgreNewt@@QAEXXZ)
1>SimpleVehicule.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>SimpleVehicule.obj : error LNK2001: unresolved external symbol __imp__NewtonBodySetAutoFreeze


Do i have to move it anywhere? I have the ogrenewt lib and the newton dll in the release folder and included the lib for ogrenewt. This is probably a newb error!

walaber

27-01-2006 01:11:44

you need to setup the include / linker directories in your project settings (in your IDE), to point to the OgreNewt / Newton libraries.

you don't need to copy the ogrenewt lib file anywhere, just the newton.dll into your project's working directory.

grizzley90

27-01-2006 21:04:24

Oh... Thanks fixed that problem.

grizzley90

27-01-2006 21:08:31

ok in the constructor of the simple vehicule class. what do i change makesimplebox to if i want to use the points of the mesh instead of making a box.

// first thing we need to do is create the rigid body for the main chassis.
Ogre::Vector3 size(0.5,0.8,0.2);
OgreNewt::Body* bod = makeSimpleBox(size, position,orient);

I have a whole bunch of questions because ive tried endlessly to get my vehicule to work correctly but i end up with different problems once i get one solved.
my mesh loads completly in the wrong orientation. I tried fixing it but it also changed the orientation of th box everytime i change the orientation of the car thats obvious. i tried changing the orientation in my 3d api but it made no difference. My wheels also load incorrectly. In the debug lines the invisible wheel is perfect but then the visible mesh is flipped. so its like -|- instead of | (lol what i mean is the | is the invisible wheel and the - is the mesh) so the car looks like its paddling when it moves.

walaber

27-01-2006 21:36:21

you need to change the orientation in your modeller, and re-export. it WILL make a difference.

then you need to make a ConvexHull from your model, instead of the simple box. have a look at the documentation for how to do that.

grizzley90

27-01-2006 23:06:15

Hey. I just realized that the blender exporter sets any rotation to a specific one and that you have to set the rotation, scale etc.. in the exporter dialog. Before i was rotating it inside blender and it didn't affect it till i releazied that it was the exporter. Sorry. Thank You Very Much, as for the Convex Hull I will attempt and figure that out later when i come back. Thank You Walaber for all the help you keep providing for noobs like myself! You're a Great Guy! :D

walaber

28-01-2006 00:13:30

by the way, if you want to rotate the model inside blender, instead of rotatin in "object mode", press tab to go into edit mode, and select all and rotate there. this works.