When I use this simple code:
CCUserDefault::sharedUserDefault()->setStringForKey("string", "value1");
CCUserDefault::sharedUserDefault()->flush ();
std::string m_user = CCUserDefault::sharedUserDefault()->getStringForKey ("key", "blah");
"getStringForKey" raise an exception.
And the file generated is:
͌͌value1
The weird text before "value1" is "CD 8C CD 8C" in hexadecimal. The test demo compiles and executes ok. My computer is "Spanish", and the source code is in UTF-8. Debugging the code, the entry char* is correct.
Any idea?
Thx.
EDIT: Using "cocos2d-1.0.1-x-0.12.0"
A “rebuild-all” to the cocos2dx libs solved the problem… :-?