I tried to use custom allocator.
But I cannot compile the project as it occur linnk error.
The error message is "error LNK2001: unresolved external symbol “class cocos2d::allocator::AllocatorStrategyDefault cocos2d::allocator::ccAllocatorGlobal”.
Please help me.
I declared it in .h file following.
static cocos2d::allocator::AllocatorStrategyPool<AnimationShowObject> allocator;
CC_USE_ALLOCATOR_POOL(AnimationShowObject, allocator)
and in the .cpp file, declared as following.
cocos2d::allocator::AllocatorStrategyPool AnimationShowObject::allocator( “AnimationShowObjectAllocator” );
and I changed ccConfig.h file as following.
CC_ENABLE_ALLOCATOR 1
CC_ENABLE_ALLOCATOR_DIAGNOSTICS 0
CC_ENABLE_ALLOCATOR_GLOBAL_NEW_DELETE 1
CC_ALLOCATOR_GLOBAL cocos2d::allocator::AllocatorStrategyDefault
CC_ALLOCATOR_GLOBAL_NEW_DELETE cocos2d::allocator::AllocatorStrategyGlobalSmallBlock
I am using cocos2dx 3.14.1