user3389247
user3389247

Reputation: 271

Unresolved inclusion: "cocos2d.h" - Cocos2dx

when I import the cocos2dx android project in my eclipse I get this warning on my header files

    Unresolved inclusion: "cocos2d.h"

Why is this? Its actually bugging me. The project compiles and runs correctly but I want that to go away. Can someone tell me how to remove that warning and also I want the intellisense feature for my c++ projects in eclipse. I have that feature for my android stuff but not for c++.

Please guide me. Thanks in advance :)

Upvotes: 3

Views: 914

Answers (2)

Jeff Tang
Jeff Tang

Reputation: 1804

If it's Cocos2dx v3.0, the answer above is not correct. Please check my answer at this: Many Errors with cocos2d-x-3.0 project creation

Upvotes: 1

einverne
einverne

Reputation: 6692

Add cocos2d-x resource to your Eclipse

  • Right click your project and choose Properties
  • Find Java Build Path
  • Find Link Source Browse under Source Tab
  • Add $COCOS2DX-HOME/cocos2dx/platform/android/java/src/ and fill cocos2dx src in Folder name

Reference: http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started

Upvotes: 1

Related Questions