Xcode Write C + + program is really poor, so this two days in the installation of Eclipse to write, the environment toss to toss, annoying all bored to death, installation is also prone to error, finally solved, first install cocos2d-x, then install ant,ndk,android Sdk,adt Plugin and so on a series of things, in the download a write C + + Eclipse, modify ~/.bash_profile. Finally, it's ready. To provide my current. Bash_profile
Provide a download address, due to the Great Wall of China, to a not to climb out of the address: http://www.androiddevtools.cn
# ADD environment variable cocos_console_root for Cocos2d-xexport cocos_console_root=/users/roy/cocos2d-x/tools/ Cocos2d-console/binexport path= $COCOS _console_root: $PATH # ADD environment variable Cocos_frameworks for Cocos2d-xexport cocos_frameworks=/applications/cocos/frameworksexport path= $COCOS _frameworks: $PATH # ADD include for Cocos2d-xexport cocos_include=/applications/cocos/frameworks/cocos2d-x-3.4rc1/cocosexport PATH= $COCOS _include:$ path# ADD environment variable ant_root for cocos2d-xexport ant_root= $ANT _home/binexport gopath=~/goexport ANDROID_SDK_ Root=/users/roy/library/android/sdkexport path= $ANDROID _root: $PATHexport Ndk_root=/users/roy/library/android/ Ndkexport path= $NDK _root: $PATH # ADD environment variable cocos_templates_root for Cocos2d-xexport cocos_templates_root =/users/roy/cocos2d-x/templatesexport path= $COCOS _templates_root: $PATHexport path=/users/roy/library/android/sdk /platform-tools:/users/roy/library/android/sdk/tools: $PATH
Today's talk about how to change the direction of the device in the Cocos code, the link is as follows: Http://www.cocos2d-x.org/wiki/Device_Orientation
COCOS2DX Study notes (2)