官网说cocos2dx v2.2.6 支持ios 64位的, 但是LocalStorage.h 不支持64位的,有谁遇到过相同问题吗,求大神帮解决下
把代码和重现方式写出来。
void CDBManager::OpenDB( std::string szPath )
{
CloseDB();
//CCLog("Init db == %s",szPath.c_str());
localStorageInit(szPath.c_str());
}
void CDBManager::SetValue( const std::string& key, std::string szValue )
{
//CCLog(“SetValue(%s,%s)”,szKey,szValue.c_str());
localStorageSetItem(key,szValue.c_str());
}
void CDBManager::SetValue( const std::string& key, int nValue )
{
char szFormat={0};
snprintf(szFormat,32,"%d",nValue);
SetValue(key,szFormat);
}
void CDBManager::SetValue( const std::string& key, float fValue )
{
char szFormat={0};
snprintf(szFormat,32,"%f",fValue);
SetValue(key,szFormat);
}
void CDBManager::DeleteItem( const std::string& key )
{
localStorageRemoveItem(key);
}
void CDBManager::CloseDB()
{
//CCLog(“Close db”);
localStorageFree();
}
这应该是你有没有实现的声明造成的吧,你的CDBManager的构造函数和析构函数呢
有的啊,没有贴出来
还没解决? 解决了说一下呗
x86_64编译不过 是因为你使用了iphone6或6p的模拟器来编译造成的;
要么用arm64真机编译要么用iphone5/5s的模拟器