discrepancies in compiling with mingw(SVN-Rev2919)

kallitokaco

30-06-2010 15:20:15

Hey,

I tried to compile OgreNewt Rev2919( 26.June.2010) with Newton Win2.22,Ogre1.7.1. and MinGW (tdm-gcc 4.5). But I had to change a few things. I'm not sure if its the best way but it works. Is there a better solution?

OgreNewt_Body.h(499)
-- std::vector<std::pair<Ogre::Vector3, Ogre::Vector3>> m_accumulatedGlobalForces;
++ std::vector<std::pair<Ogre::Vector3, Ogre::Vector3> > m_accumulatedGlobalForces;

OgreNewt_Predefines.h(36)
++#include <OgreSceneNode.h>
++#include <OgreSceneManager.h>
++#include <OgreManualObject.h>

OgreNewt_Debugger(7)
++#include <NewtonCustomJoint.h>

I would be pleased if you could add this to your svn, if it works with other compilers.

Thx

kallaspriit

03-07-2010 11:22:03

Added the changes, let me know if there are still problems :)

kallitokaco

06-07-2010 21:52:39

thx old errors are gone.
...but your latest revisition contains a getInfo() funktion with a extra qualification, is it needed? MinGW hates (copy/paste) extra qualifications in .h :wink:
OgreNewt_Collision.h
(106)--NewtonCollisionInfoRecord* Collision::getInfo() { return getInfo( m_col ); }
(106)++NewtonCollisionInfoRecord* getInfo() { return getInfo( m_col ); }
(109)--static NewtonCollisionInfoRecord* Collision::getInfo(const NewtonCollision *col);
(109)++static NewtonCollisionInfoRecord* getInfo(const NewtonCollision *col);

And I found few warnings:

ogrenewt_body.cpp(21)
--m_userdata = NULL;
++m_userdata = 0;
(userdata is not a pointer)

OgreNewt_Collision.h
(24)--enum _OgreNewtExport CollisionPrimitiveType
(24)++enum CollisionPrimitiveType
(it makes no sence to export an enum)

OgreNewt_CollisionPromitives.h
(29)--enum _OgreNewtExport FaceWinding { FW_DEFAULT, FW_REVERSE };
(29)++enum FaceWinding { FW_DEFAULT, FW_REVERSE };
(it makes still no sence to export an enum, a dll doesn't contain enums oder class declarations, I think. :roll: )

OgreNewt_RayCast.cpp(152)
--if ((hitnum < 0) || (hitnum >= mRayList.size()))
++if (hitnum >= mRayList.size())
(hitnum is unsigned. As a result, always>0)

thx a lot

kallaspriit

07-07-2010 17:17:10

Thank you very much for pointing these out, added the changes to SVN.

Reports like these are always welcome and will be added to the repository :)