I am trying to figure out which #include’s to use when using the COLLADA DOM (I’ve already finished everything else).
I have the following includes at the top of my file:
#include <dae.h>
#include <dom/domMaterial.h>
#include <dom/domP.h>
#include <dom/domGeometry.h>
#include <dom/domTriangles.h>
#include <dom/domCOLLADA.h>
#include <SDL/SDL.h>
#include <GL/glew.h>
There is a problem, however, and I get it in domTypes.h:
/usr/local/include/colladadom/1.5/dom/domTypes.h:268: error: expected identifier before numeric constant
/usr/local/include/colladadom/1.5/dom/domTypes.h:268: error: expected `}' before numeric constant
/usr/local/include/colladadom/1.5/dom/domTypes.h:268: error: expected unqualified-id before numeric constant
/usr/local/include/colladadom/1.5/dom/domTypes.h:278: error: expected declaration before '}' token
This just means there is a name conflict, I think. I looked in the file, and this looks suspicous to me:
enum domGl_blend {
GL_BLEND_ZERO = 0x0,
GL_BLEND_ONE = 0x1,
GL_BLEND_SRC_COLOR = 0x0300,
GL_BLEND_ONE_MINUS_SRC_COLOR = 0x0301,
GL_BLEND_DEST_COLOR = 0x0306,
GL_BLEND_ONE_MINUS_DEST_COLOR = 0x0307,
GL_BLEND_SRC_ALPHA = 0x0302,
GL_BLEND_ONE_MINUS_SRC_ALPHA = 0x0303,
GL_BLEND_DST_ALPHA = 0x0304,
GL_BLEND_ONE_MINUS_DST_ALPHA = 0x0305,
GL_BLEND_CONSTANT_COLOR = 0x8001,
GL_BLEND_ONE_MINUS_CONSTANT_COLOR = 0x8002,
GL_BLEND_CONSTANT_ALPHA = 0x8003,
GL_BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x8004,
GL_BLEND_SRC_ALPHA_SATURATE = 0x0308,
GL_BLEND_COUNT = 15
};
Am I doing something wrong?
EDIT:
I think I know the problem.
GLEW uses #define’s to create the constants, so the preprocessor is replacing the text with the value:
#define GL_BLEND_SRC_ALPHA 0x80CB
This is a naming conflict. What should I do? The actual values are different, which means that something is wrong.