hi,
I am struggling with this issue since last week.
I still can’t figure out where is the error.
My code is compiling perfect if I restart the eclipse. but, when I edit the c++ file it shows red marks in eclipse. and I get error that “Your project contains error(s), please fix it before running it.”
I am not using cygwin using this link http://patidarvikas.blogspot.in/2013/09/build-and-run-cocos2dx-android-project.html
I have also used this link to setup and get it working.
http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/
these are my include paths:
D:~~ndk-r9-x64\platforms\android-18\arch-arm\usr\include
D:D:2dx\include
D:~~ndk-r9-x64\toolchains\arm-linux-androideabi-4.8\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.8\include
Please help me setup the debug environment and remove the red marks in my eclipse.
P.S.
development platform : win 7
developing for platform : android
Capture.PNG (54.2 KB)
yagoub
April 6, 2014, 11:36am
#3
Yes, i have the same error
Help us please .
sadzey
April 6, 2014, 11:38am
#4
@yagoub don’t cry, we’ll get the solution.
This is my includes, see attached image.
in the Symbols tab, you need to define ANDROID
you also need to tell the eclipse/indexer you’re using c++11
yagoub
April 7, 2014, 11:41am
#6
Thanks @devnoob , But your solution doesn’t work with me.
Have you resolved the linked sources?
See attached image.
yagoub
April 7, 2014, 1:18pm
#8
@devnoob please, tell me where i can find the linked folder cocos2dx.
It’s in the cocos2d\cocos\2d directory, at the root of your project.
See attached image.
yagoub
April 7, 2014, 3:25pm
#10
Thanks,i did all what you told me, But it didn’t work.
if you open the helloworldscene.cpp and scroll to the bottom of the file, do you see the bit of code being greyed out like mine?
If not, make sure you defined ANDROID & your include path has “\cocos2d\cocos\2d\platform\android”.
See attached.
Hi, Eclipse isn’t a good C++ editor, and it can’t always link correctly. So the following steps may be helpful for you.
Right click your project in Eclipse.
C/C++ General -> Code Analysis -> check ‘Potential Programming Problems’ and ‘Syntax and Semantic Errors’ disable .
yagoub
April 8, 2014, 6:29am
#13
@Ryeeeeee but if i do this, i can’t see the errors, so it’s difficult to develop like this.
@yagoub
Eclipse is weak at developing C++.
So I don’t recommend you to use Eclipse to develop C/C++.
There is a good idea.
Use Visual Studio to develop C++ if you work on win7(or use Xcode if you work on Mac).
And use Eclipse to develop Android part.
damort
January 9, 2016, 12:49pm
#15
Has anyone figured out how to use Eclipse C++?