Reputation: 2330
I've downloaded and installed cocos2dx 3.0 on my computer and made a new project. I'm able to compile for both iOS and Android successfully. However, I made some code changes in the HelloWorldScene.cpp and compiled these changes in Xcode. I saw the changes and everything seemed to work. I then opened the project in eclipse and compiled and ran on my nexus 7, however my nexus did not see the changes that the iOS version did. I then noticed that the Classes folder is empty in eclipse. This folder should contain the .cpp .h files for the C++ game logic. I've gone through quite a few tutorials and google searches but the documentation is inconsistent as it seems the folder and project structure for cocos2dx is slightly different between cocos 2.x versions and version 3.0.
**Steps I've tried
Upvotes: 2
Views: 1400
Reputation: 3145
Right click on the Classes folder. Go to properties. Pick Resources from the left.
Click on Edit to edit the link. A window will pop out. Browse to your game folder and then select classes from the folder. Click Ok and you must see the files!
However, as far as compiling is concerned, every changes that you make in the CPP files needs to be compiled through the build_native.py
command for Android. That is to say:
type python build_native.py. for example:
cd /home/kasra/Desktop/testgame/MyGame/proj.android/
python build_native.py
Remember to do this step everytime after you make any change! I have not found an easier way. But I am searching for it. It should have something to do with C++ builder. If I find anything I will post it here.
Upvotes: 5