It’s been a month that I’m trying to run cocos2d-x on eclipse… ( windows 8 ).
I’ve tried alot of tutorials , and I always arrive at the point that everything is set up , I compile the HelloWorld project on my device: no errors , it runs fine.
The problem is that when i modify the “Helloworldscene.cpp” file , like i change this line:
When i REcompile , on my device it still shows “HelloWorld”.
Even if i delete part of the code in that file , nothing changes , just like if it doesnt even read it…
Please help , I really want to start developing on cocos2d-x , and I’m kind of desperate here^^
You are not compiling c**, you either use the command line or you convert your project to a combined Java/C** project, take a look at this great tutorial:
I may be a bit old, but it helped me a lot.
And these are few notes I had to do for every of my projects (may not fit everyone else):
To support Android API 8, two steps:
open app/jni/Application.mk and add
APP_PLATFORM
android-8
open AndroidManifest.xml and change minSdkVersion=“8”
Add this to AndroidManifest.xml if you need connection:
Add extensions:
Select project properties, C/C*+ General, Paths and Symbols, Includes, CNU C**, and add:
/path_to_your_cocos2d-x/extensions
Edit jni/Android.mk andd add any new c*+ classes you create:
LOCAL_SRC_FILES
hellocpp/main.cpp …/…/Classes/AppDelegate.cpp …/…/Classes/HelloWorldScene.cpp
IMPORTANT! To avoid reseting the assets folder, comment all code related on the build_native.h
I did what you told me. I noticed that when I compile a warning appears in the console:
C:… /proj.android/build_native.sh: line 75: C:-ndk-r8b;/cygdrive/c/android-ndk-r8b/ndk-build: No such file or directory
I build on my phone like always , but that error appears… Maybe its because of this that it doenst compile the c++ part ?
In your Eclipse’s project, go to Properties > C/C++ General > Paths and Symbols, and select the “Includes” tab. Select “GNU C++” in the Language list and click “Add” to include a directory. Now, browse for C++ sources: on Mac, these should be locate in /usr/include/c++.