程序是这样的:
enum matrixtype {
MATRIX_GENERAL,
MATRIX_IDENTITY,
MATRIX_3D_NO_ROT,
MATRIX_PERSPECTIVE,
MATRIX_2D,
MATRIX_2D_NO_ROT,
MATRIX_3D
};
typedef struct {
float *m;
float *inv;
int flags;
enum GLmatrixtype type;
}matrix;
编译后报错:
E:\Tornado2.2\target\h\ugl\glmatrix.h:24: redeclaration of `enum matrixtype'
E:\Tornado2.2\target\h\ugl\glmatrix.h:25: conflicting types for `MATRIX_GENERAL'
E:\Tornado2.2\target\h\ugl\glmatrix.h:25: previous declaration of `MATRIX_GENERAL'
E:\Tornado2.2\target\h\ugl\glmatrix.h:26: conflicting types for `MATRIX_IDENTITY'
E:\Tornado2.2\target\h\ugl\glmatrix.h:26: previous declaration of `MATRIX_IDENTITY'
E:\Tornado2.2\target\h\ugl\glmatrix.h:27: conflicting types for `MATRIX_3D_NO_ROT'
E:\Tornado2.2\target\h\ugl\glmatrix.h:27: previous declaration of `MATRIX_3D_NO_ROT'
E:\Tornado2.2\target\h\ugl\glmatrix.h:28: conflicting types for `MATRIX_PERSPECTIVE'
E:\Tornado2.2\target\h\ugl\glmatrix.h:28: previous declaration of `MATRIX_PERSPECTIVE'
E:\Tornado2.2\target\h\ugl\glmatrix.h:29: conflicting types for `MATRIX_2D'
E:\Tornado2.2\target\h\ugl\glmatrix.h:29: previous declaration of `MATRIX_2D'
E:\Tornado2.2\target\h\ugl\glmatrix.h:30: conflicting types for `MATRIX_2D_NO_ROT'
E:\Tornado2.2\target\h\ugl\glmatrix.h:30: previous declaration of `MATRIX_2D_NO_ROT'
E:\Tornado2.2\target\h\ugl\glmatrix.h:32: conflicting types for `MATRIX_3D'
E:\Tornado2.2\target\h\ugl\glmatrix.h:32: previous declaration of `MATRIX_3D'
E:\Tornado2.2\target\h\ugl\glmatrix.h:46: conflicting types for `matrix'
E:\Tornado2.2\target\h\ugl\glmatrix.h:46: previous declaration of `matrix'
很奇怪的语法错误。难道tornado不支持enum类型??
各位高手帮忙看看!thx ^_^