Enable to call getTextureForKey() method on cocos2d::Director::getInstance()->getTextureCache()

@slackmoehrle @drelaptop we want to load the image on the button at run time so we are implementing one class in which we are using

auto texture = cocos2d::Director::getInstance()->getTextureCache()->getTextureForKey(url);

but on this line, it says Class ‘TextureCache’ doesn’t have a function 'getTextureForKey’

I never used it, so maybe i can’t help you, but my doubt is:
Did you use Director::getInstance()->getTextureCache()->addImage(Image *image, const std::string &key) before to call Director::getInstance()->getTextureCache()->getTextureForKey(const std::string &key) ?

thanks, Solve it it was header file error, I removed all header and added back one by one and it worked