Undefined symbols for architecture i386:
"cocos2d::CCDictionary::objectForKey(std::string const&)", referenced from:
cocos2d::extension::ActionManager::getActionByName(char const*, char const*) in CCActionManager.o
cocos2d::extension::CCBAnimationManager::getBaseValue(cocos2d::CCNode*, char const*) in CCBAnimationManager.o
cocos2d::extension::CCBAnimationManager::actionForCallbackChannel(cocos2d::extension::CCBSequenceProperty*) in CCBAnimationManager.o
cocos2d::extension::CCBAnimationManager::runAnimationsForSequenceIdTweenDuration(int, float) in CCBAnimationManager.o
cocos2d::extension::CCArmatureAnimation::play(char const*, int, int, int, int) in CCArmatureAnimation.o
cocos2d::extension::CCArmature::addBone(cocos2d::extension::CCBone*, char const*) in CCArmature.o
cocos2d::extension::CCArmature::getBone(char const*) const in CCArmature.o
...
"cocos2d::CCDictionary::removeObjectForKey(std::string const&)", referenced from:
cocos2d::extension::CCArmature::removeBone(cocos2d::extension::CCBone*, bool) in CCArmature.o
cocos2d::extension::CCArmatureDataManager::removeArmatureData(char const*) in CCArmatureDataManager.o
cocos2d::extension::CCArmatureDataManager::removeAnimationData(char const*) in CCArmatureDataManager.o
cocos2d::extension::CCArmatureDataManager::removeTextureData(char const*) in CCArmatureDataManager.o
"cocos2d::CCDictionary::setObject(cocos2d::CCObject*, std::string const&)", referenced from:
cocos2d::extension::ActionManager::initWithDictionary(char const*, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&, cocos2d::CCObject*) in CCActionManager.o
cocos2d::extension::CCBAnimationManager::setBaseValue(cocos2d::CCObject*, cocos2d::CCNode*, char const*) in CCBAnimationManager.o
cocos2d::extension::CCBAnimationManager::setCallFunc(cocos2d::CCCallFunc*, std::string const&) in CCBAnimationManager.o
cocos2d::extension::CCBReader::readNodeGraph(cocos2d::CCNode*) in CCBReader.o
cocos2d::extension::CCNodeLoader::onHandlePropTypeFloat(cocos2d::CCNode*, cocos2d::CCNode*, char const*, float, cocos2d::extension::CCBReader*) in CCNodeLoader.o
cocos2d::extension::CCNodeLoader::onHandlePropTypeInteger(cocos2d::CCNode*, cocos2d::CCNode*, char const*, int, cocos2d::extension::CCBReader*) in CCNodeLoader.o
cocos2d::extension::CCNodeLoader::onHandlePropTypeCheck(cocos2d::CCNode*, cocos2d::CCNode*, char const*, bool, cocos2d::extension::CCBReader*) in CCNodeLoader.o
...
好像是xcode版本升上来以后就有了这问题,以前解决过也没太注意是什么原因,一碰到又半天找不到地方。
看到libcocos2dx.a在正常项目中是可见的,但在错误项目中是红色的。
右键在Finder中打开,正常项目地址:
/Users/Chaim/Library/Developer/Xcode/DerivedData/PROJECT-fzbkhiqjieppwgexfbririfmhige/Build/Products/Debug-iphoneos
错误项目无法打开,只是打开最近一个使用的Finder,无法找到文件位置。
发现cocos2d-x被设成支持c++11,而错误项目没有指定,设置:
Apple LLVM 6.1 - Language -> C Language Dialec = gnu11
Apple LLVM 6.1 - Language - C++ -> C++ Language Dialect = GNU++11[-std=gnu++11] C++ Standard Library = libc++(...C++11 support)
重新编译就好了,与那个库文件没任何关系,调过c++11支持,自己又忘了,以记之。。。
"cocos2d::CCDictionary::objectForKey(std::string const&)", referenced from:
cocos2d::extension::ActionManager::getActionByName(char const*, char const*) in CCActionManager.o
cocos2d::extension::CCBAnimationManager::getBaseValue(cocos2d::CCNode*, char const*) in CCBAnimationManager.o
cocos2d::extension::CCBAnimationManager::actionForCallbackChannel(cocos2d::extension::CCBSequenceProperty*) in CCBAnimationManager.o
cocos2d::extension::CCBAnimationManager::runAnimationsForSequenceIdTweenDuration(int, float) in CCBAnimationManager.o
cocos2d::extension::CCArmatureAnimation::play(char const*, int, int, int, int) in CCArmatureAnimation.o
cocos2d::extension::CCArmature::addBone(cocos2d::extension::CCBone*, char const*) in CCArmature.o
cocos2d::extension::CCArmature::getBone(char const*) const in CCArmature.o
...
"cocos2d::CCDictionary::removeObjectForKey(std::string const&)", referenced from:
cocos2d::extension::CCArmature::removeBone(cocos2d::extension::CCBone*, bool) in CCArmature.o
cocos2d::extension::CCArmatureDataManager::removeArmatureData(char const*) in CCArmatureDataManager.o
cocos2d::extension::CCArmatureDataManager::removeAnimationData(char const*) in CCArmatureDataManager.o
cocos2d::extension::CCArmatureDataManager::removeTextureData(char const*) in CCArmatureDataManager.o
"cocos2d::CCDictionary::setObject(cocos2d::CCObject*, std::string const&)", referenced from:
cocos2d::extension::ActionManager::initWithDictionary(char const*, rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&, cocos2d::CCObject*) in CCActionManager.o
cocos2d::extension::CCBAnimationManager::setBaseValue(cocos2d::CCObject*, cocos2d::CCNode*, char const*) in CCBAnimationManager.o
cocos2d::extension::CCBAnimationManager::setCallFunc(cocos2d::CCCallFunc*, std::string const&) in CCBAnimationManager.o
cocos2d::extension::CCBReader::readNodeGraph(cocos2d::CCNode*) in CCBReader.o
cocos2d::extension::CCNodeLoader::onHandlePropTypeFloat(cocos2d::CCNode*, cocos2d::CCNode*, char const*, float, cocos2d::extension::CCBReader*) in CCNodeLoader.o
cocos2d::extension::CCNodeLoader::onHandlePropTypeInteger(cocos2d::CCNode*, cocos2d::CCNode*, char const*, int, cocos2d::extension::CCBReader*) in CCNodeLoader.o
cocos2d::extension::CCNodeLoader::onHandlePropTypeCheck(cocos2d::CCNode*, cocos2d::CCNode*, char const*, bool, cocos2d::extension::CCBReader*) in CCNodeLoader.o
...
好像是xcode版本升上来以后就有了这问题,以前解决过也没太注意是什么原因,一碰到又半天找不到地方。
看到libcocos2dx.a在正常项目中是可见的,但在错误项目中是红色的。
右键在Finder中打开,正常项目地址:
/Users/Chaim/Library/Developer/Xcode/DerivedData/PROJECT-fzbkhiqjieppwgexfbririfmhige/Build/Products/Debug-iphoneos
错误项目无法打开,只是打开最近一个使用的Finder,无法找到文件位置。
发现cocos2d-x被设成支持c++11,而错误项目没有指定,设置:
Apple LLVM 6.1 - Language -> C Language Dialec = gnu11
Apple LLVM 6.1 - Language - C++ -> C++ Language Dialect = GNU++11[-std=gnu++11] C++ Standard Library = libc++(...C++11 support)
重新编译就好了,与那个库文件没任何关系,调过c++11支持,自己又忘了,以记之。。。