Hi,
I'm encountering compilation errors when integrating the Spine C++ runtime into my custom game engine, which is built on DirectX 11 (D3D11). The errors occur in member functions from the SpineExtension class (SpineExtension::calloc, SpineExtension::realloc, etc.), all related to memory allocation.
Issue Details:
Error Count: 72 compilation errors consistently occur.
Affected Files:
Extension.h
SpineSpring.h
Vector.h
BlockAllocator.h
Pool.h
Functions Causing Errors:
from **class SpineExtension** in **Extension.h**
static T *alloc(size_t num, const char *file, int line);
static T *calloc(size_t num, const char *file, int line);
static T *realloc(T *ptr, size_t num, const char *file, int line);
static void free(T *ptr, const char *file, int line);
Error Logs (Duplicated logs omitted)
unrecognizable template declaration/definition
type 'char' unexpected
syntax error: unexpected token '>' following 'simple-type-specifier'
syntax error: unexpected token '>' following 'simple-declaration'
syntax error: unexpected token '>' following 'expression'
syntax error: unexpected token ',' following 'expression-statement'
syntax error: unexpected token ')' following 'statement-seq'
syntax error: unexpected token ')' following 'statement'
syntax error: unexpected token ')' following 'selection-statement'
syntax error: unexpected token ')' following 'expression-statement'
syntax error: unexpected token ')' following 'compound-statement'
syntax error: missing ')' before ','
syntax error: 'constant'
syntax error: ',' was unexpected here; expected ';'
syntax error: ','
syntax error: ')' was unexpected here; expected '}'
syntax error: ')' was unexpected here; expected ';'
syntax error: ')'
'valueCopy': undeclared identifier
'spine::SpineExtension::_realloc_dbg': no matching overloaded function found
'spine::SpineExtension::_free_dbg': no matching overloaded function found
'line': undeclared identifier
'file': undeclared identifier
'file': identifier not found
'calloc': is not a member of 'spine::SpineExtension'
What I’ve Checked:
My game engine code doesn’t seem to have any issues, so I suspect something might be missing in my Spine integration. However, I’m not sure what the missing piece could be.
Any insights or suggestions on what might be causing this would be greatly appreciated. Please let me know if you need any additional details.
Thank you!