COCOS2DX Development: Documenting some of the problems encountered and how to solve them

Source: Internet
Author: User

Today, I took a look at some of the notes recorded in the previous study cocos2dx, mainly in the actual problems encountered, collated a bit, became this article, easy to find themselves later, but also for some novice to provide some experience. This article will be updated all the time and will be updated to the article in the later development of the problem.1. The process of using cocos2d-x-2.2.0 to create a new projectResolution: 2.0 Later versions do not have the Install-templates-msvc.bat configuration template script,You cannot create a cocos2d-x project directly in VS2010, you can only run a Python script from a terminal window to create a new project.Solution:Step 1: Switch the terminal window directory to Cocos2d-x-2.2.0\tools\project-creatorStep 2: Execute python create_project.py-project mytest-package com.mypackage-language cpp in the terminal windowThe new project can be found in step 3:cocos2d-x-2.2.0\projects 2. The process of using cocos2d-x-3.6 to create a new project
Step 1: Switch the terminal window directory to Cocos2d-x-3.6\tools\cocos2d-console\bin
Step 2: Execute in the terminal window
python cocos.py new HelloCpp -p com.coco2dx.org -l cpp -d ~/Desktop
Step 3: Locate the project under the last specified directory3.cocos2dx Chinese garbled problemChange the encoding of the corresponding file from ANSI to Utf-84.cocos2d-x 2.0 does not contain a Cocosstudio library, how to use its exported skeletal animation? Ccarmature is not the content of the COCOS2DX core package, it belongs to the extension class,more than 2.2 versions include
5.cocos2d-x version 3.6(1) Error in first compile with vs2012Cause: The project path does not have Chinese(2) color4f do not know, compile error solution//debugfornormalsprite->drawpoints (positions, 4, 8, color4f{0.0,1.0,1.0,1.0});debugfornormalsprite->drawpoints (positions, 4, 8, color4f::gray);(3) When the configuration is complete, a compilation error occurs when using the armature related class, as follows: 2>d:\mycocos2dx\hellococos2dx\classes\helloworldscene.cpp: Error C2653: " Cocostudio ": Not a class or namespace name 2>d:\mycocos2dx\hellococos2dx\classes\helloworldscene.cpp: Error C2227:" Addarmaturefileinfo "On the left must point to the class/struct/union/generic type 2> type is" ' Unknown-type ' "2>d:\mycocos2dx\hellococos2dx\classes\ Helloworldscene.cpp: Error C3861: "Sharedarmaturedatamanager": identifier not foundResolution: 1) When using these related classes, in the corresponding. h file header contains the header file CocosStudio.h file,2) Add Cocosstudio namespace name before class name6. Use d:\ work \cocos2d-2.0 Create new project, there is a problem finding the header file on the buildSolution: http://www.58player.com/blog-2526-116264.htmlScheme:
Step 1: Set the project's properties-configuration Properties-C + +-Additional Include directories
D:\ work \cocos2d-2.0;
.;
.. \classes;
D:\ work \cocos2d-2.0\cocos2dx;
D:\ work \cocos2d-2.0\cocos2dx\include;
D:\ work \cocos2d-2.0\cocos2dx\kazmath\include;
D:\ work \cocos2d-2.0\cocos2dx\platform\win32;
D:\ work \cocos2d-2.0\cocos2dx\platform\third_party\win32;
D:\ work \cocos2d-2.0\cocos2dx\platform\third_party\win32\ogles;
D:\ work \cocos2d-2.0\external;
D:\ work \cocos2d-2.0\cocosdenshion\include;
% (additionalincludedirectories)
Step 2: Copy all the DLL files and Lib files in the Debug.win32 directory under the d:\ work \cocos2d-2.0 directory to the Debug.win32 directory of the Project
Step 3: Copy all DLL files and Lib files in the Debug.win32 directory under the d:\ work \cocos2d-2.0 directory to the C:\Windows\System32 directory
Configuration is successful!Historical version of 7.COCOS2DX's github repository download does not workQ:I have debugged 3.x and 2.x versions, can not be normal generation, and later found that the reason is a lot of picture files and library files. h,. lib files are added. Removed.git-id suffix. as follows:A:COCOS2DX Development team in order to control the size of the GitHub warehouse, some duplicate binaries (mainly third-party library files and pictures) are tagged and removed with BFG Repo-cleaner.

Q:How do I recover the binaries that were removed when a user downloads a version? A: download_deps.py to download third-party libraries. The third party libraries version is external/versions.json set in theContinuous Update ... 

COCOS2DX Development: Documenting some of the problems encountered and how to solve them

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.