I don’t understand why I’m getting this error! Please help… Here are my steps.
I needed to get texture memory info based on how many images and fonts are loaded. I found a post on this site about this and copied the code to implement it.
I added a new method to CCTextureCache.cpp.
I then added the method definition to the CCTextureCache.h file in the VolatileTexture class.
static void dumpVolatileTextureInfo();
I then rebuild libcocos2d project and it rebuilds just fine.
I then go to helloworldscene.cpp and add the line.
VolatileTexture::dumpVolatileTextureInfo(); - this was picked up by intellisense no problem
I also included the CCTextureCache.h in the helloworldscene.cpp file just in case
I’ve verified that the helloworld project has the libcocos2d.lib file linked in
helloworld project builds but fails on the LINK stage with this error:
Error 45 error LNK2019: unresolved external symbol “public: static void cdecl cocos2d::VolatileTexture::dumpVolatileTextureInfo" referenced in function "public: virtual boolthiscall HelloWorld::init(void)” (?init@HelloWorld@@UAE_NXZ)
Please help me figure this out. I can’t see what I’ve missed.