The weird way IOS declares member variables in class implementation definitions

Source: Internet
Author: User

Just started to learn cocos2-x, just follow the tutorial to the general Android has been installed in the development environment of the eclipse re-upgrade to install the CDT and the NDK took me dozens of hours, almost give up.

Reference Blog D:\cocos2d-x\cocos2d-x-2.2.3\cocos2dx\platform\third_party\android\prebuilt

Tell me about the process:

Download NDK plugin, NDK package, CDT plugin. At first I follow the book downloaded Cocos2d-x 2.0.1, hoping to unify with the book, so later when learning can be a reference book will not encounter too many problems. After the good to meet the problem, my computer only vs2013, and that version only support 2010 and 2008, I turned the project into a vs2013, when the new project found no cocos2d template, this is 2013 with that convergence a bit of a problem. Then I downloaded the cocos2d-x2.2.3 version of the, and then listen to the roommate said the new edition can not use VS to create new projects, and then Baidu to see what the latest is the same thing, the original is a Python script to create a new multi-platform project. OK, then download Python, because the habit of the problem I like to download the latest software every time, downloaded and installed, environment variables are also well-equipped, Start a new 2.2.3 Project (by the way, 2.0.1 seems to be unable to use the Python method to build, because I did not find the corresponding file, I do not know if there are other methods, so I download 2.2.3 version), run the time to find the console error, syntax error, said that print how to drop ... Baidu again to know 3.0 version of the Python after the print changed to a function to write print (), no way to uninstall and download a 2.7 version of the next is Yimapingchuan, but .... This is just a new project, it is hard to compile and run on your phone.

As for how that is imported I will not say, say the key, is so many red fork how to eliminate.

1. Add Cocos2d-x-2.2.3\cocos2dx\platform\android\java to eclipse and make it easier to call later.

2. Add the 1 imported project to the BuildPath.

3. Refer to http://blog.csdn.net/b1boy/article/details/14645277, which is said to be better,

Ndk_root Path is D:\AndroidSDK\android-ndk-r9d

COCOS2DX Path is D:\cocos2d-x\cocos2d-x-2.2.3

Ndk_module_path Path is d:\cocos2d-x\cocos2d-x-2.2.3;d:\cocos2d-x\cocos2d-x-2.2.3\cocos2dx\platform\third_party\ Android\prebuilt

To declare, the above Ndk_module_path I see on other blogs that some people say that the one between the two paths is a colon, such as Path 1: Path 2: Path 3 ... , I also changed this, did not change well, finally still use the semicolon. It turns out that semicolons are right and don't know why they have to be stressed with colons, which may be a version of the problem.

These two points are very important, see clearly the position of the picture, set up the error basically almost lost

4. Modify ANDROID.MK Add

$ (call Import-add-path,d:\cocos2d-x\cocos2d-x-2.2.3 )
D:\ Cocos2d-x\cocos2d-x-2.2.3\cocos2dx\platform\third_party\android\prebuilt )

There is absolutely no space in the 5.NDK path. I don't know when I call in Eclipse, but a command line will show you that there is no space in the hint path. As for the path of COCOS2DX can have spaces, I do not remember now, in order to insure everyone set the path when you do not have spaces or Chinese characters.

6. If there is a file in CPP or Java that says the header file or the package class is not found, you need to include the D:\AndroidSDK\android-ndk-r9d\platforms\android-14\arch-arm\usr\include New Folder->advanced->link ... ->finish added in this way.

The above is my dozens of-hour summary, hey ... Finally, the first part is done.


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.