Search code examples
ioscocos2d-x

Cocos2d-x Build for iOS Simulator?


I am playing around with cocos2d-x trying to get the example to build but I keep getting an error "Cannot recognize the target platform; are you targeting an unsupported platform?" below is the ifdef statement for the iPhone target. But it doesn't seem to be picking up the iOS Simulator.

#if defined(CC_TARGET_OS_IPHONE)
    #undef  CC_TARGET_PLATFORM
    #define CC_TARGET_PLATFORM         CC_PLATFORM_IOS
#endif

Is there something I need to change to get it to work on iOS Simulator?


Solution

  • In the project C++ settings you should add define CC_TARGET_OS_IPHONE