I encountered this problem when I tried to build mkxp.
make: *** [filesystem.o] Error 1
In file included from src/bitmap.cpp:33:
src/gl-meta.h:57:44: warning: instantiation of variable 'VertexTraits<Vertex>::attr' required here, but no definition is available [-Wundefined-var-template]
vao.attr = VertexTraits<VertexType>::attr;
^
src/quad.h:79:11: note: in instantiation of function template specialization 'GLMeta::vaoFillInVertexData<Vertex>' requested here
GLMeta::vaoFillInVertexData<Vertex>(vao);
^
src/vertex.h:65:32: note: forward declaration of template entity is here
static const VertexAttribute *attr;
^
src/gl-meta.h:57:44: note: add an explicit instantiation declaration to suppress this warning if 'VertexTraits<Vertex>::attr' is explicitly instantiated in another translation unit
vao.attr = VertexTraits<VertexType>::attr;
^
Not sure why, but I managed to fix it by adding a line to define VertexTraits<Vertex>::attr, and it worked for me.
I encountered this problem when I tried to build mkxp.
Not sure why, but I managed to fix it by adding a line to define
VertexTraits<Vertex>::attr
, and it worked for me.Environment