The 'New' New version update thread (Newton 2.3)

SFCBias

22-07-2011 04:36:44

Ok I've finished making OgreNewt compile with Newton 2.33 and it can be found in the usual place: OgreNewt SVN Repository

I also updated the Install.txt to explain how to get it to compile, since the file hierarchy for Newton 2.33 is different than previous versions. For Linux, everything should just about be the same. To help find the paths it'll ask for, On my system the point to newton-dynamics-2.33/coreLibrary_200/source/newton, the rest should be handled thru CMake.

Also, windows users, I just realised that in Install.txt i said 'core_200' , that should be 'coreLibrary_200' assuming the original paths are intact.

This also marks the beginning of my rewrite to make things simpler. It will be more manager oriented but i think it will make things easier to work with. Like i said before, this will take time and will only support the basic features at first, but as things progress, i'll add in the other stuff on a prioritized basis.

Sord

24-07-2011 03:21:37

Thanks for work! Lets see tomorrow does it compiling in my hands :lol:
What physical shapes it support (now / 2 two weeks ahead)?

SFCBias

25-07-2011 20:33:58

If you're referring to my rewrite, it's in progress still, but it'll support all the collision shapes (box,ellipsoid,convex,triangle,heightfield).

Kosmos

06-08-2011 19:41:17

Could anyone post precompiled binaries for newton 2.33 and ogrenewt that works with ogre3d 1.7.3?
if it continue that way soon i end like bald, because i tear some part of my hair when i getting one more 1k unresolved externals while compilation or etc.
spend all day on trying to compile different versions of newton, ogrenewt and etc and tha best thing i got that ogrenewt compiles without any errors about cand find some files or etc, but now i just have 250 unresolved externals :twisted:

SFCBias

10-08-2011 02:35:19

This works with newton 2.33, your probably not linking to a library. I can't really help you if you don't give me anymore information other than 250 unresolved externals. I'm not 100% sure it'll compile out of the box for you, but i got it to compile before posting. I may have missed something, but i need you to give me more info.

Kosmos

10-08-2011 06:59:11

Thanks for the answer.
the reasons i did not give any additional details - i didn't wanted to retranslate all that errors from russian to english, because i have russian visual c++ express 2010, i just hoped someone post prebuild binaries, well some person already asked for it in Help section of main forum but look no one do so.
At another day i were able to reduce unresolved externals amount to 4, by linking project with every .lib file that i find it newton sdk.
still i getting around 850 weird warnings like: local defined symbol "bla bla bla" was imported
and unresolved externals related to joint functions, but i am sure i linking to that joints lib.
soon i will install english version of vc++ and edit this post to show all that disaster.

UPDATE:
errors:
Error 899 error LNK1120: 4 unresolved externals D:\ogrenewt_vcpp\lib\OgreNewt.dll
Error 895 error LNK2001: unresolved external symbol "__declspec(dllimport) public: void * __thiscall NewtonCustomJoint::GetUserData(void)const " (__imp_?GetUserData@NewtonCustomJoint@@QBEPAXXZ) D:\ogrenewt_vcpp\OgreNewt_Joint.obj
Error 894 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void * __thiscall NewtonCustomJoint::GetUserData(void)const " (__imp_?GetUserData@NewtonCustomJoint@@QBEPAXXZ) referenced in function "private: static void __cdecl OgreNewt::Debugger::newtonprocessJoints(struct NewtonJoint const *,void *)" (?newtonprocessJoints@Debugger@OgreNewt@@CAXPBUNewtonJoint@@PAX@Z) D:\ogrenewt_vcpp\OgreNewt_Debugger.obj
Error 897 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserData(void *)" (__imp_?SetUserData@NewtonCustomJoint@@QAEXPAX@Z) referenced in function "public: virtual __thiscall OgreNewt::Joint::~Joint(void)" (??1Joint@OgreNewt@@UAE@XZ) D:\ogrenewt_vcpp\OgreNewt_Joint.obj
Error 896 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserDestructorCallBack(void (__cdecl*)(struct NewtonUserJoint const *))" (__imp_?SetUserDestructorCallBack@NewtonCustomJoint@@QAEXP6AXPBUNewtonUserJoint@@@Z@Z) referenced in function "public: virtual __thiscall OgreNewt::Joint::~Joint(void)" (??1Joint@OgreNewt@@UAE@XZ) D:\ogrenewt_vcpp\OgreNewt_Joint.obj
Error 898 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserSubmintConstraintCallBack(void (__cdecl*)(struct NewtonUserJoint const *,float,int))" (__imp_?SetUserSubmintConstraintCallBack@NewtonCustomJoint@@QAEXP6AXPBUNewtonUserJoint@@MH@Z@Z) referenced in function "protected: void __thiscall OgreNewt::Joint::SetSupportJoint(class NewtonCustomJoint *)" (?SetSupportJoint@Joint@OgreNewt@@IAEXPAVNewtonCustomJoint@@@Z) D:\ogrenewt_vcpp\OgreNewt_Joint.obj


weird warnings (850+):
Warning 685 warning LNK4049: locally defined symbol ??2NewtonCustomJoint@@SAPAXI@Z (public: static void * __cdecl NewtonCustomJoint::operator new(unsigned int)) imported D:\ogrenewt_vcpp\OgreNewt_Joint.obj
see more in attached file. this warnings just weird for me, i think it would not work even if i compile it

I am working with OgreNewt project only and trying to compile it. not touching demos

OGRE_HOME points to D:\OgreSDK_vc10_v1-7-3
NEWTON_HOME points to D:\newton_svn\trunk

changed this all because original paths is weird. they point on unexistant directory structure like: $(NEWTON_HOME)\sdk <-- there is no such folder at all, $(NEWTON_HOME)/sdk/x32/dll_vs9 (for libs) same as previous and etc

Additional include directories:
$(OGRE_HOME)\include
$(OGRE_HOME)\boost_1_44
$(OGRE_HOME)\include\OIS
$(OGRE_HOME)\include\OGRE
$(NEWTON_HOME)\coreLibrary_200\source\newton
$(NEWTON_HOME)\packages\dMath
$(NEWTON_HOME)\packages\dCustomJoints
.\inc

Additional include librares:
$(OGRE_HOME)\lib\$(Configuration)
$(OGRE_HOME)/boost_1_44/lib
$(NEWTON_HOME)/packages/Win32/release

Linked libs (for release):
newton.lib
core.lib
physics.lib
dMath.lib
dJointLibrary.lib
OgreMain.lib

Trioxin

11-08-2011 04:42:58

I get the same issue as Kosmos in VS2008

1>OgreNewt - 251 error(s), 888 warning(s)

All linker errors.

1>newton.lib(NewtonClass.obj) : error LNK2001: unresolved external symbol "protected: virtual void __thiscall dgBilateralConstraint::JointVelocityCorrection(class dgJointAccelerationDecriptor const &)" (?JointVelocityCorrection@dgBilateralConstraint@@MAEXABVdgJointAccelerationDecriptor@@@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "public: void __thiscall dgWorld::DestroyConstraint(class dgConstraint *)" (?DestroyConstraint@dgWorld@@QAEXPAVdgConstraint@@@Z) referenced in function "public: void __thiscall NewtonDeadJoints::DestroyJoints(class Newton &)" (?DestroyJoints@NewtonDeadJoints@@QAEXAAVNewton@@@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall dgWorld::~dgWorld(void)" (??1dgWorld@@UAE@XZ) referenced in function "public: virtual __thiscall Newton::~Newton(void)" (??1Newton@@UAE@XZ)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "public: void * __thiscall dgMemoryAllocator::Malloc(int)" (?Malloc@dgMemoryAllocator@@QAEPAXH@Z) referenced in function "public: __thiscall NewtonUserJoint::NewtonUserJoint(class dgWorld *,int,void (__cdecl*)(struct NewtonJoint const * const,float,int),void (__cdecl*)(struct NewtonJoint const * const,struct NewtonJointRecord * const),class dgBody *,class dgBody *)" (??0NewtonUserJoint@@QAE@PAVdgWorld@@HP6AXQBUNewtonJoint@@MH@ZP6AX1QAUNewtonJointRecord@@@ZPAVdgBody@@5@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "protected: __thiscall dgUserConstraint::dgUserConstraint(class dgWorld * const,class dgBody * const,class dgBody * const,int)" (??0dgUserConstraint@@IAE@QAVdgWorld@@QAVdgBody@@1H@Z) referenced in function "public: __thiscall NewtonUserJoint::NewtonUserJoint(class dgWorld *,int,void (__cdecl*)(struct NewtonJoint const * const,float,int),void (__cdecl*)(struct NewtonJoint const * const,struct NewtonJointRecord * const),class dgBody *,class dgBody *)" (??0NewtonUserJoint@@QAE@PAVdgWorld@@HP6AXQBUNewtonJoint@@MH@ZP6AX1QAUNewtonJointRecord@@@ZPAVdgBody@@5@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "protected: void __thiscall dgBilateralConstraint::CalculateAngularDerivative(int,class dgContraintDescritor &,class dgVector const &,float,float,float *)" (?CalculateAngularDerivative@dgBilateralConstraint@@IAEXHAAVdgContraintDescritor@@ABVdgVector@@MMPAM@Z) referenced in function "public: void __thiscall NewtonUserJoint::AddAngularRowJacobian(class dgVector const &,float)" (?AddAngularRowJacobian@NewtonUserJoint@@QAEXABVdgVector@@M@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "protected: void __thiscall dgBilateralConstraint::SetJacobianDerivative(int,class dgContraintDescritor &,float const *,float const *,float *)" (?SetJacobianDerivative@dgBilateralConstraint@@IAEXHAAVdgContraintDescritor@@PBM1PAM@Z) referenced in function "public: void __thiscall NewtonUserJoint::AddGeneralRowJacobian(float const *,float const *)" (?AddGeneralRowJacobian@NewtonUserJoint@@QAEXPBM0@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "protected: void __thiscall dgBilateralConstraint::CalculatePointDerivative(int,class dgContraintDescritor &,class dgVector const &,class dgConstraint::dgPointParam const &,float *)" (?CalculatePointDerivative@dgBilateralConstraint@@IAEXHAAVdgContraintDescritor@@ABVdgVector@@ABVdgPointParam@dgConstraint@@PAM@Z) referenced in function "public: void __thiscall NewtonUserJoint::AddLinearRowJacobian(class dgVector const &,class dgVector const &,class dgVector const &)" (?AddLinearRowJacobian@NewtonUserJoint@@QAEXABVdgVector@@00@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "protected: void __thiscall dgConstraint::InitPointParam(class dgConstraint::dgPointParam &,float,class dgVector const &,class dgVector const &)const " (?InitPointParam@dgConstraint@@IBEXAAVdgPointParam@1@MABVdgVector@@1@Z) referenced in function "public: void __thiscall NewtonUserJoint::AddLinearRowJacobian(class dgVector const &,class dgVector const &,class dgVector const &)" (?AddLinearRowJacobian@NewtonUserJoint@@QAEXABVdgVector@@00@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "public: __thiscall dgWorld::dgWorld(class dgMemoryAllocator * const)" (??0dgWorld@@QAE@QAVdgMemoryAllocator@@@Z) referenced in function "public: __thiscall Newton::Newton(float,class dgMemoryAllocator * const)" (??0Newton@@QAE@MQAVdgMemoryAllocator@@@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "public: void __thiscall dgWorld::DestroyBody(class dgBody * const)" (?DestroyBody@dgWorld@@QAEXQAVdgBody@@@Z) referenced in function "public: void __thiscall Newton::DestroyBody(class dgBody *)" (?DestroyBody@Newton@@QAEXPAVdgBody@@@Z)
1>newton.lib(NewtonClass.obj) : error LNK2019: unresolved external symbol "public: void __thiscall dgWorld::Update(float)" (?Update@dgWorld@@QAEXM@Z) referenced in function "public: void __thiscall Newton::UpdatePhysics(float)" (?UpdatePhysics@Newton@@QAEXM@Z)
1>./lib/OgreNewt.dll : fatal error LNK1120: 245 unresolved externals

SFCBias

13-08-2011 00:57:35

Those are errors pointing to the Newton Libs, not OgreNewt. Make sure you're linking against both OgreNewt and Newton (which may include dMath,dCustomJoints, etc).

Trioxin

13-08-2011 06:54:17

4 errors, 888 warnings now:


1>OgreNewt_Joint.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void * __thiscall NewtonCustomJoint::GetUserData(void)const " (__imp_?GetUserData@NewtonCustomJoint@@QBEPAXXZ)
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserDestructorCallBack(void (__cdecl*)(struct NewtonUserJoint const *))" (__imp_?SetUserDestructorCallBack@NewtonCustomJoint@@QAEXP6AXPBUNewtonUserJoint@@@Z@Z) referenced in function "public: virtual __thiscall OgreNewt::Joint::~Joint(void)" (??1Joint@OgreNewt@@UAE@XZ)
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserData(void *)" (__imp_?SetUserData@NewtonCustomJoint@@QAEXPAX@Z) referenced in function "public: virtual __thiscall OgreNewt::Joint::~Joint(void)" (??1Joint@OgreNewt@@UAE@XZ)
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserSubmintConstraintCallBack(void (__cdecl*)(struct NewtonUserJoint const *,float,int))" (__imp_?SetUserSubmintConstraintCallBack@NewtonCustomJoint@@QAEXP6AXPBUNewtonUserJoint@@MH@Z@Z) referenced in function "protected: void __thiscall OgreNewt::Joint::SetSupportJoint(class NewtonCustomJoint *)" (?SetSupportJoint@Joint@OgreNewt@@IAEXPAVNewtonCustomJoint@@@Z)
1>./lib/OgreNewt.dll : fatal error LNK1120: 4 unresolved externals




Libs:

newton.lib
core.lib
dContainers.lib
dMath.lib
dJointLibrary.lib
physics.lib
OgreMain.lib


I don't have a dCustomJoints.lib compiles by newton, however.

SFCBias

15-08-2011 02:32:50

Well, all three of the functions named are defined inside the NewtonCustomJoints header file (NewtonCustomJoints.h). Make sure somewhere in your code you have that file included. (It's included from OgreNewt_stdafx.h).

Note: dJointLibrary.lib is correct, there is not lib called dCustomJoints.lib

Kosmos

16-08-2011 08:41:56

NewtonCustomJoints.h does not exist, the one which exist is NewtonCustomJoint.h, and that really included in OgreNewt_stdafx.h by default.
so how we need to make sure, somewhere in our code we have that file included, if it included by default? and all ogrenewt cpps have include on OgreNewt_stdafx.h.
Trioxin, if you are able to compile it somehow, could you upload your project files somewhere and share with me?

rride

16-08-2011 10:32:11

4 errors, 888 warnings now:


1>OgreNewt_Joint.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void * __thiscall NewtonCustomJoint::GetUserData(void)const " (__imp_?GetUserData@NewtonCustomJoint@@QBEPAXXZ)
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserDestructorCallBack(void (__cdecl*)(struct NewtonUserJoint const *))" (__imp_?SetUserDestructorCallBack@NewtonCustomJoint@@QAEXP6AXPBUNewtonUserJoint@@@Z@Z) referenced in function "public: virtual __thiscall OgreNewt::Joint::~Joint(void)" (??1Joint@OgreNewt@@UAE@XZ)
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserData(void *)" (__imp_?SetUserData@NewtonCustomJoint@@QAEXPAX@Z) referenced in function "public: virtual __thiscall OgreNewt::Joint::~Joint(void)" (??1Joint@OgreNewt@@UAE@XZ)
1>OgreNewt_Joint.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall NewtonCustomJoint::SetUserSubmintConstraintCallBack(void (__cdecl*)(struct NewtonUserJoint const *,float,int))" (__imp_?SetUserSubmintConstraintCallBack@NewtonCustomJoint@@QAEXP6AXPBUNewtonUserJoint@@MH@Z@Z) referenced in function "protected: void __thiscall OgreNewt::Joint::SetSupportJoint(class NewtonCustomJoint *)" (?SetSupportJoint@Joint@OgreNewt@@IAEXPAVNewtonCustomJoint@@@Z)
1>./lib/OgreNewt.dll : fatal error LNK1120: 4 unresolved externals




Libs:

newton.lib
core.lib
dContainers.lib
dMath.lib
dJointLibrary.lib
physics.lib
OgreMain.lib


I don't have a dCustomJoints.lib compiles by newton, however.


See


#ifdef _NEWTON_USE_LIB
#define JOINTLIBRARY_API
#else
#ifdef JOINTLIBRARY_LIB
#define JOINTLIBRARY_API
#else
#ifdef JOINTLIBRARY_EXPORTS
#define JOINTLIBRARY_API __declspec(dllexport)
#else
#define JOINTLIBRARY_API __declspec(dllimport)
#endif
#endif
#endif


So if _NEWTON_USE_LIB and JOINTLIBRARY_LIB are undefined for the file including NewtonCustomJoint.h, you'll get those errors link-time errors

Commando125

19-08-2011 06:13:45

Will the latest revision of OgreNewt only work with Newton 2.33? I tried compiling OgreNewt with Newton 2.25 and I get this error:


OgreNewt_ContactJoint.h(115): error C2660: 'NewtonMaterialGetContactPositionAndNormal' : function does not take 4 arguments
OgreNewt_ContactJoint.h(118): error C2660: 'NewtonMaterialGetContactTangentDirections' : function does not take 4 arguments


Will it still work with Newton 2.2x, or do I have to find a way to compile OgreNewt with Newton 2.33?

SFCBias

21-08-2011 13:38:22

Yes it only works with 2.33 because many of the functions in Newton changed from 2.2x. What you could do is go back 2 revisions and use that one since it was made to work with 2.2x and you should be fine. You won't be missing any new features. (yet)

@Kosmos
NewtonCustomJoints.h does not exist, the one which exist is NewtonCustomJoint.h, and that really included in OgreNewt_stdafx.h by default.
so how we need to make sure, somewhere in our code we have that file included, if it included by default? and all ogrenewt cpps have include on OgreNewt_stdafx.h.
Trioxin, if you are able to compile it somehow, could you upload your project files somewhere and share with me?


The functions you are getting the errors from are clearly defined in NewtonCustomJoint.h

// these member function are only use by the C interface,
void SetUserData (void* userData) {m_userData = userData;}
void* GetUserData () const {return m_userData;}
void SetUserSubmintConstraintCallBack (JointUserSubmitConstraintCallBack callback) {m_userContrationCallback = callback;}
void SetUserDestructorCallBack (JointUserDestructorCallBack callback) {m_userDestructor = callback;}


Do you know what lines of code you are using these from, because im not getting any errors.

I linked in this order
-lOgreMain -lNewton -ldJointLibrary -ldContainers -ldMath

Kosmos

22-08-2011 14:29:00

where i could see that? "what lines of code i am using these from"
i just trying to compile ogrenewt project at current rev (2985) and now can't even compile because of:
Error 7 error C2664: 'void std::tr1::_Function_impl2<_Ret,_Arg0,_Arg1>::operator ()(_Arg0,_Arg1) const' : cannot convert parameter 2 from 'boost::arg<I>' to 'OgreNewt::Body *' c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxcallobj 13
but around 4 revisions ago it successfully compiled, but was unable to link.
i just tried today to update from your svn
now i have newton ad revision 708 and ogrenewt at revision 2985

Thew

28-08-2011 13:06:41

I'm getting the same error as Kosmos:
OgreNewt_RayCastVehicle.cpp
1>c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxcallobj(13): error C2664: 'void std::tr1::_Function_impl2<_Ret,_Arg0,_Arg1>::operator ()(_Arg0,_Arg1) const' : cannot convert parameter 2 from 'boost::arg<I>' to 'OgreNewt::Body *'
1> with
1> [
1> _Ret=void,
1> _Arg0=OgreNewt::RayCastVehicle *,
1> _Arg1=OgreNewt::Body *
1> ]
1> and
1> [
1> I=1
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxbind1(292) : see reference to function template instantiation '_Ret std::tr1::_Callable_obj<_Ty,_Indirect>::_ApplyX<_Ret,_Arg&,boost::arg<I>&>(_Arg0,_Arg1)' being compiled
1> with
1> [
1> _Ret=_Rx,
1> _Ty=std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,
1> _Indirect=false,
1> _Arg=OgreNewt::RayCastVehicle *,
1> I=1,
1> _Arg0=OgreNewt::RayCastVehicle *&,
1> _Arg1=boost::arg<1> &
1> ]
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxbind0(31) : see reference to function template instantiation '_Ret std::tr1::_Bind2<_Callable,_Arg0,_Arg1>::_ApplyX<_Rx,OgreNewt::Body&,std::tr1::_Nil&,std::tr1::_Nil&,std::tr1::_Nil&,std::tr1::_Nil&,std::tr1::_Nil&,std::tr1::_Nil&,std::tr1::_Nil&,std::tr1::_Nil&,std::tr1::_Nil&>(_Barg0,_Barg1,_Barg2,_Barg3,_Barg4,_Barg5,_Barg6,_Barg7,_Barg8,_Barg9)' being compiled
1> with
1> [
1> _Ret=_Rx,
1> _Callable=std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,
1> _Arg0=OgreNewt::RayCastVehicle *,
1> _Arg1=boost::arg<1>,
1> _Barg0=OgreNewt::Body *&,
1> _Barg1=std::tr1::_Nil &,
1> _Barg2=std::tr1::_Nil &,
1> _Barg3=std::tr1::_Nil &,
1> _Barg4=std::tr1::_Nil &,
1> _Barg5=std::tr1::_Nil &,
1> _Barg6=std::tr1::_Nil &,
1> _Barg7=std::tr1::_Nil &,
1> _Barg8=std::tr1::_Nil &,
1> _Barg9=std::tr1::_Nil &
1> ]
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxcallobj(13) : see reference to function template instantiation 'void std::tr1::_Bind_base<_Ret,_BindN>::operator ()<_Arg0&>(_Carg0)' being compiled
1> with
1> [
1> _Ret=std::tr1::_Notforced,
1> _BindN=std::tr1::_Bind2<std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,OgreNewt::RayCastVehicle *,boost::arg<1>>,
1> _Arg0=OgreNewt::Body *,
1> _Carg0=OgreNewt::Body *&
1> ]
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxfunction(65) : see reference to function template instantiation '_Ret std::tr1::_Callable_obj<_Ty>::_ApplyX<_Rx,_Arg0&>(OgreNewt::Body)' being compiled
1> with
1> [
1> _Ret=void,
1> _Ty=std::tr1::_Bind_fty<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,std::tr1::_Notforced,std::tr1::_Bind2<std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,OgreNewt::RayCastVehicle *,boost::arg<1>>>,
1> _Rx=void,
1> _Arg0=OgreNewt::Body *
1> ]
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxfunction(64) : while compiling class template member function 'void std::tr1::_Impl_no_alloc1<_Callable,_Rx,_Arg0>::_Do_call(_Arg0)'
1> with
1> [
1> _Callable=_MyWrapper,
1> _Rx=void,
1> _Arg0=OgreNewt::Body *
1> ]
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxfunction(386) : see reference to class template instantiation 'std::tr1::_Impl_no_alloc1<_Callable,_Rx,_Arg0>' being compiled
1> with
1> [
1> _Callable=_MyWrapper,
1> _Rx=void,
1> _Arg0=OgreNewt::Body *
1> ]
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxfunction(369) : see reference to function template instantiation 'void std::tr1::_Function_impl1<_Ret,_Arg0>::_Reset0o<_Myimpl,_Fty,std::allocator<_Ty>>(_Fty,_Alloc)' being compiled
1> with
1> [
1> _Ret=void,
1> _Arg0=OgreNewt::Body *,
1> _Fty=std::tr1::_Bind_fty<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,std::tr1::_Notforced,std::tr1::_Bind2<std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,OgreNewt::RayCastVehicle *,boost::arg<1>>>,
1> _Ty=std::tr1::_Function_impl1<void,OgreNewt::Body *>,
1> _Alloc=std::allocator<std::tr1::_Function_impl1<void,OgreNewt::Body *>>
1> ]
1> c:\Program Files\Microsoft Visual Studio 10.0\VC\include\functional(113) : see reference to function template instantiation 'void std::tr1::_Function_impl1<_Ret,_Arg0>::_Reset<_Fx>(_Fty)' being compiled
1> with
1> [
1> _Ret=void,
1> _Arg0=OgreNewt::Body *,
1> _Fx=std::tr1::_Bind_fty<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,std::tr1::_Notforced,std::tr1::_Bind2<std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,OgreNewt::RayCastVehicle *,boost::arg<1>>>,
1> _Fty=std::tr1::_Bind_fty<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,std::tr1::_Notforced,std::tr1::_Bind2<std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,OgreNewt::RayCastVehicle *,boost::arg<1>>>
1> ]
1> C:\Program Files\OgreNewt\inc\OgreNewt_Body.h(195) : see reference to function template instantiation 'std::tr1::function<_Fty>::function<std::tr1::_Bind_fty<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,_Ret,_BindN>>(_Fx)' being compiled
1> with
1> [
1> _Fty=void (OgreNewt::Body *),
1> _Ret=std::tr1::_Notforced,
1> _BindN=std::tr1::_Bind2<std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,OgreNewt::RayCastVehicle *,boost::arg<1>>,
1> _Fx=std::tr1::_Bind_fty<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,std::tr1::_Notforced,std::tr1::_Bind2<std::tr1::_Callable_obj<std::tr1::function<void (OgreNewt::RayCastVehicle *,OgreNewt::Body *)>,false>,OgreNewt::RayCastVehicle *,boost::arg<1>>>
1> ]
1> src\OgreNewt_RayCastVehicle.cpp(33) : see reference to function template instantiation 'void OgreNewt::Body::setNodeUpdateNotify<OgreNewt::RayCastVehicle>(std::tr1::function<_Fty>,c *)' being compiled
1> with
1> [
1> _Fty=void (OgreNewt::RayCastVehicle *,OgreNewt::Body *),
1> c=OgreNewt::RayCastVehicle
1> ]

I'm using Visual Studio 2010 but when I change the platform toolset (project properties > configuration properties > general) to vc90 it compiles without errors.

SFCBias

29-08-2011 04:31:54

The next chance I get, I'll try and compile this from windows. Until then, using vc90 shouldn't hurt.

Thew

29-08-2011 06:41:29

Yes it compiles with vc90 platform, but I can't get it working with my project in vc100 :cry:

StormChild

23-09-2011 19:33:17

Hi there,

I just got OgreNewt to compile yesterday, after getting similar errors as Kosmos. I altered the Newton header file rride mentioned and had to define the macro "_NEWTON_USE_LIB" manually. Additionally, OgreNewt wanted to compile as a multithreaded debug dll, switched this to multithreaded debug as newton uses that. Than everything "went fine", as long as you don't count the hundreds of warnings about local symbol import... :?
I don't know much about dll generation - Microsoft states, that the generated code is correct, but somewhat slower, so a solution to this would be highly appreciated!

Anyway, now I've tried to add some physics to my application, but on destructing the world the programm crashes with Windows mentioning a possible heap corruption, seems to have something to do with the shared pointers on destroying the collsion objects... has anyone had similar problems?

Thank you in advance! :)

PS: I'm using Ogre 1.7.2 and Visual Studio 2008

tod

26-09-2011 12:02:08

I have the same crash on exit, but I must admit I didn't really care about cleaning my objects.:roll:

StormChild

26-09-2011 23:56:18

Hm, but I want to clear the Newton world and rebuild it on level changes, for example. Calling world->destroyAllBodies() gives naturally the same error. Or is there any other way to "deactivate" a Newton body completly until (manual) reactivation? The freeze-unfreeze methods won't help if other bodies are to be created in the same place, right?

StormChild

27-09-2011 19:24:47

Ok, I seem to got rid of the symbols import warnings and the heap corruption issue - I just linked OgreNewt statically instead of dynamically and set my project settings to "Multithreaded [Debug]". At least until now everything seems to be working correctly... :D

Latin1

29-10-2011 01:53:35

What is the OGRE_BUILD_HOME environment variable?

Install.txt says it's the "directory where you built your Ogre 1.7", but in the demos it's referenced in the Include directories like this:


$(OGRE_BUILD_HOME)\include
$(OGRE_BUILD_HOME)\include\OIS


Only the Ogre root and the samples have a directory called "include".

Bagoly

02-12-2011 16:38:49

Hi,

Anybody who get this error compiling with VS2010

Error 7 error C2664: 'void std::tr1::_Function_impl2<_Ret,_Arg0,_Arg1>::operator ()(_Arg0,_Arg1) const' : cannot convert parameter 2 from 'boost::arg<I>' to 'OgreNewt::Body *' c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xxcallobj 13

change the following lines in OgreNewt_Body.h (line 193) from

template<class c> void setNodeUpdateNotify (OgreNewt::function<void(c*, OgreNewt::Body*)> callback, c *instancedClassPointer )
{
setNodeUpdateNotify( OgreNewt::bind(callback, instancedClassPointer, _1) );
}


to

template<class c> void setNodeUpdateNotify (OgreNewt::function<void(c*, OgreNewt::Body*)> callback, c *instancedClassPointer )
{
setNodeUpdateNotify( OgreNewt::bind(callback, instancedClassPointer, std::tr1::placeholders::_1) );
}


It works for me.

Bagoly

tothmarcell97

25-12-2011 00:56:57

Hi All,

I just managed to compile the wrapper in release mode. I used Newton 2.32 and Ogre 1.7.3. I never used Newton before, and I'm learning to use Ogre too, so I couldn't test it yet, but I hope that the attached dll works, and it will be useful for anybody who don't want to compile OgreNewt from source.

Download: http://www.datafilehost.com/download-7bb4a66d.html

Bulker

22-07-2012 20:09:54

Hi,

I just compiled Ogre Newt for the first time. It required some "adjustments" before i got it to compile.

I have now gone through this tutorial: http://www.ogre3d.org/tikiwiki/tiki-ind ... OgreNewt+2
and I noticed that the methods:
void calculateInertialMatrix( Ogre::Vector3& inertia, Ogre::Vector3& offset ) const { NewtonConvexCollisionCalculateInertialMatrix( m_col, &inertia.x, &offset.x ); }
void setCenterOfMass( const Ogre::Vector3& centerOfMass ) { NewtonBodySetCentreOfMass( m_body, &centerOfMass.x ); }


does not have any implementation at all. When the tutorial was written I assume there was an implementation, so why is there none now?

It does not seem to be much activity here, is the project alive at all? Sad if it is not active anymore, I was happy when I saw there was a physics library for OGRE. I will continue to explore Ogre Newt and I hope most of it contain implementations :-)

tod

22-07-2012 22:00:26

That is the implementation of the methods! :))
You may notice they simply call the corresponding newton APIs.

Bulker

23-07-2012 05:58:59

What do you mean? The impl-file simply does not mention the methods causing a linker error.

tod

23-07-2012 09:04:10

The functions are implemented directly in the header, in the definition. If the linker error is related to this maybe you use an older newton lib, or ogre newt lib. Or the newton functions have had a parameter change. You should post the error, if you cannot manage to solve it.

Chookaa

07-01-2013 03:15:22

howdy all,

i just compiled OgreNewt with vs2012.

i just upgraded and rebuilt the vs2010 projects in the newton source 2.35, 2.36 isn't playing nice for me atm.

i was getting the std::tr1 error's aswell. some google searching later i found out it's probably a issue with c++11 http://connect.microsoft.com/VisualStudio/feedback/details/764670/error-using-std-tr1-function-templates-in-visual-studio-2012-express-in-xrefwrap

my fix was to add OGRENEWT_USE_BOOST to the processor def's to force the use of the boost implementation.

iblues1976

15-05-2013 19:52:11

have you tested with 2.36 ?

Anyone running this in VS2012?