"Syntax error" at "USING_NS_CC" and "Symbol 'CCObject' could not be resolved" in eclipse

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)

same error :;fury

Yes, i have the same error
Help us please :frowning: .

@yagoub don’t cry, we’ll get the solution.

This is my includes, see attached image.

  1. in the Symbols tab, you need to define ANDROID
  2. you also need to tell the eclipse/indexer you’re using c++11

Thanks @devnoob , But your solution doesn’t work with me.

Have you resolved the linked sources?
See attached image.

@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.

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.

@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.

Has anyone figured out how to use Eclipse C++?