Build error - physicsBullet.cpp, ContactAddedCallback
by Doc308 · in Game Mechanics Kit · 11/04/2012 (2:03 pm) · 1 replies
I have been working on compiling Bullet, gMK & Guidebot, have gotten through to the end of GMK/Bullet and got stuck with this:
error C2440: '=' : cannot convert from 'bool (__cdecl *)(btManifoldPoint &,const btCollisionObject *,int,int,const btCollisionObject *,int,int)' to 'ContactAddedCallback' c:torquetorque 3d 1.2enginesourcet3dlogickingmechanicsphysicsbulletphysicsbullet.cpp 43
1> physicsBullet.cpp
1>c:torquetorque 3d 1.2enginesourcet3dlogickingmechanicsphysicsbulletphysicsbullet.cpp(43): error C2440: '=' : cannot convert from 'bool (__cdecl *)(btManifoldPoint &,const btCollisionObject *,int,int,const btCollisionObject *,int,int)' to 'ContactAddedCallback'
1> This conversion requires a reinterpret_cast, a C-style cast or function-style cast
btManifoldResult.cpp & btManifoldResult.h are the associated files, but nothing seems out of place.
Closest rational answer I could find is: It should be a static or global function. Class member function expects to receive an additional hidden parameter called this, so the signature doesn't match.
Here's the line that is causing the error:
Any help would be greatly appreciated.
error C2440: '=' : cannot convert from 'bool (__cdecl *)(btManifoldPoint &,const btCollisionObject *,int,int,const btCollisionObject *,int,int)' to 'ContactAddedCallback' c:torquetorque 3d 1.2enginesourcet3dlogickingmechanicsphysicsbulletphysicsbullet.cpp 43
1> physicsBullet.cpp
1>c:torquetorque 3d 1.2enginesourcet3dlogickingmechanicsphysicsbulletphysicsbullet.cpp(43): error C2440: '=' : cannot convert from 'bool (__cdecl *)(btManifoldPoint &,const btCollisionObject *,int,int,const btCollisionObject *,int,int)' to 'ContactAddedCallback'
1> This conversion requires a reinterpret_cast, a C-style cast or function-style cast
btManifoldResult.cpp & btManifoldResult.h are the associated files, but nothing seems out of place.
Closest rational answer I could find is: It should be a static or global function. Class member function expects to receive an additional hidden parameter called this, so the signature doesn't match.
Here's the line that is causing the error:
gContactAddedCallback = PhysicsBullet::contactAddedCallback;
Any help would be greatly appreciated.
About the author
Torque Owner Doc308
If anyone else is having something similiar in issue, I may be able to help out :)