XCode 5.0.1 OSX project - Linking error


Hi everyone,

I just updated XCode from 5.0 to 5.0.1. After relaunching XCode I can’t compile my OSX project anymore. It perfectly worked before updating. I get 65 linking errors such as:

Undefined symbols for architecture x86_64:
“cocos2d::CCDictionary::valueForKey(std::string const&)”, referenced from:

Looks like it can’t find cocos2dx anymore. But everything seems fine in the plist and build settings.

Any ideas on what could have changed and on how to fix this?



By the way, it can easily be reproduced by launching the HelloCpp project within the mac folder (in cocos2d-x 2.2.0/samples/Cpp/HelloCpp/proj.mac) using XCode 5.0.1…


I found a fix in the meanwhile. In case anyone else stumbles across this issue, here’s what I did to resolve the problem.

  • Under ‘Build Settings’ - ‘Apple LLVM 5.0 - Language - C**’ - ’C** Standard Library’ change default to ‘libc++’
  • Then change the minimum supported OS version to 10.7 (or higher)


:smiley: it works! thank you!


Thanks for this!


I just tried this. I have version 5.0.2 of XCode. I am using Cocos2d-x-2.2 and can’t seem to get this to work for me. I set the language dialect to compiler default and the standard library to libstdc**. No dice. OS Support is at 10.8.
Any ideas? :frowning: Still getting a ton of linker errors with cocos2d members.
EDIT: Nevermind! I didn’t realize that you could change the settings of nested projects too. I needed to set libstdc** on the cocos2dx.xcodeproj nested inside my main project.


I can not change the compiler to another. Because apart from APPLE LLVM 5.0 there’s nothing other.