alignment for btVector3 causes warnings then errors

Post Reply
Kuroyume
Posts: 6
Joined: Tue Feb 19, 2013 10:14 pm

alignment for btVector3 causes warnings then errors

Post by Kuroyume »

I've added the required Bullet libs to my Cinema 4D plugin project and included the header (btBulletCollisionCommon.h) into my source. When attempting simply to compile the source, I get this:
1>------ Build started: Project: CollisionDeformer, Configuration: R12.0 x64 x64 ------
1>Compiling...
1>cl : Command line warning D9002 : ignoring unknown option '/arch:SSE2'
1>CollisionDeformerObj.cpp
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(254) : warning C4328: 'btScalar btVector3::dot(const btVector3 &) const' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(928) : warning C4328: 'btVector3 operator -(const btVector3 &,const btVector3 &)' : indirection alignment of formal parameter 2 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(933) : warning C4328: 'btVector3 operator -(const btVector3 &,const btVector3 &)' : indirection alignment of formal parameter 2 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(943) : warning C4328: 'btVector3 operator /(const btVector3 &,const btScalar &)' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(979) : warning C4328: 'btScalar btVector3::dot(const btVector3 &) const' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(980) : warning C4328: 'btVector3 operator -(const btVector3 &,const btVector3 &)' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(983) : warning C4328: 'btVector3 btVector3::cross(const btVector3 &) const' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(1007) : warning C4328: 'btScalar btVector3::dot(const btVector3 &) const' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btvector3.h(1046) : warning C4328: 'btScalar btVector3::dot(const btVector3 &) const' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\linearmath\btquaternion.h(315) : warning C4328: 'btScalar btQuaternion::dot(const btQuaternion &) const' : indirection alignment of formal parameter 1 (16) is greater than the actual argument alignment (8)
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(472) : error C2143: syntax error : missing ';' before 'constant'
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(472) : error C2065: 'px' : undeclared identifier
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(476) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(478) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(480) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(482) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(484) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(486) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(488) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(490) : error C2440: '=' : cannot convert from 'btVector3' to 'double'
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>f:\3d graphics\cinema 4d\c++ sdk\projects\bullet-2.81-rev2613\src\bulletcollision\broadphasecollision\btdbvt.h(493) : error C2664: 'btDot' : cannot convert parameter 2 from 'double' to 'const btVector3 &'
1> Reason: cannot convert from 'double' to 'const btVector3'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>Build log was saved at "file://f:\3D Graphics\Cinema 4D\C++ SDK\Projects\CollisionDeformer\Commercial\R12.0\obj64\BuildLog.htm"
1>CollisionDeformer - 11 error(s), 11 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I've tried both enabling and disabling SSE options in both the lib project settings and my project settings. Is there some process to resolve this issue?

Thanks,
Robert
Kuroyume
Posts: 6
Joined: Tue Feb 19, 2013 10:14 pm

Re: alignment for btVector3 causes warnings then errors

Post by Kuroyume »

Solved: it was simply a conflict in header ordering between Bullet and the app SDK headers.
Post Reply