/Users/eonil/Work/Trials/newton-integration-test-1/r615 package/Newton.h:214:4: error: must use 'struct' tag to refer to type 'NewtonBoxParam' [3]
Current my file is from r615 (2.34), however equivalent with the file in Google Code now (r619, 2.34).
This problem cause by missing typedef to the nested structs. So this is compiled well with C++, but not with C. I solved this by getting them out and define typedefs.
- Code: Select all
// These structs were nested and now got out. And typedefs are defined.
typedef struct NewtonBoxParam NewtonBoxParam;
typedef struct NewtonSphereParam NewtonSphereParam;
typedef struct NewtonCylinderParam NewtonCylinderParam;
typedef struct NewtonCapsuleParam NewtonCapsuleParam;
typedef struct NewtonConeParam NewtonConeParam;
typedef struct NewtonChamferCylinderParam NewtonChamferCylinderParam;
typedef struct NewtonConvexHullParam NewtonConvexHullParam;
typedef struct NewtonConvexHullModifierParam NewtonConvexHullModifierParam;
typedef struct NewtonCompoundCollisionParam NewtonCompoundCollisionParam;
typedef struct NewtonCollisionTreeParam NewtonCollisionTreeParam;
typedef struct NewtonHeightFieldCollisionParam NewtonHeightFieldCollisionParam;
typedef struct NewtonSceneCollisionParam NewtonSceneCollisionParam;
typedef struct NewtonCollisionInfoRecord NewtonCollisionInfoRecord;
// These structs were not nested. Just defined additionally.
typedef struct NewtonUserMeshCollisionCollideDesc NewtonUserMeshCollisionCollideDesc;
typedef struct NewtonUserMeshCollisionRayHitDesc NewtonUserMeshCollisionRayHitDesc;
typedef struct NewtonHingeSliderUpdateDesc NewtonHingeSliderUpdateDesc;
typedef struct NewtonJointRecord NewtonJointRecord;
typedef struct NewtonWorldConvexCastReturnInfo NewtonWorldConvexCastReturnInfo;
I don't know side effect of un-nesting the structs. This is just a workaround.