Program ended with exit code: 1

Program ended with exit code: 1
0.0 0


Dear Minggo:
I use cocos2d-1.0.1-x-0.9.1 template for xcode4 on macos10.6.8 to create a cocos2dx project, when running it quicky exit and print this:“Program ended with exit code: 1”.
What should I do, please help me. Thanks! (3.6 KB)


When I comment method “shouldAutorotateToInterfaceOrientation” of, It works normally.


# Which template did you use? cocos2dx only, or cocos2dx_chipmunk, cocos2dx_box2d, cocos2dx_lua?
# I use 0.9.1 xcode4 temple + xcode v4.1 Build 4B110 + OS X 10.7, cannot reproduce your problem. After I read the attached rtf file, I can not get enough infos to locate the crash. Could you please add

#define COCOS2D_DEBUG 2

into the start of YourGame/libs/cocos2dx/platform/CCPlatformMarcos.h, then paste the error log here?


Gary Ou wrote:

When I comment method “shouldAutorotateToInterfaceOrientation” of, It works normally.

Since v0.8.5, we leave the orientation to controlled by ios UI framework, the works for this aim. This approach will make cocos2d-x game easier to integrate with GameCenter, OpenFeint, and such SDKs.
With “shoudlAutorotateToInterfaceOrienation” method, you don’t need to call CCDirector::setDeviceOrientation in your source code.